Clear Filters
Clear Filters

Working in international team causes problems reading csv files

1 view (last 30 days)
Hi We are an international team of Matlab users working on a project. Every user has its own notebook, some with European, some with American local settings. Reading csv-files using xlsread is causing problems, as the formatting of figures is different. Is there another fast way of reading csv-files with numbers and strings without running in this problem? The solution as proposed in this forum of adjusting the region settings is a no-go-option. Thanks Renger

Accepted Answer

Nayan Rao
Nayan Rao on 5 Jun 2018
Edited: Walter Roberson on 7 Jun 2018
As seen in the folwoing link 'xlsread' only supports 7-bit ASCII in xlsx files and hence the discrepancy! As a work around you can use the 'textscan' function in MATLAB-
I believe this should solve the issue. Let me know if you face any issues.
Walter Roberson
Walter Roberson on 5 Jun 2018
Note that if you plan to use textscan() with functions that use characters beyond 255, then you should probably pass in the UTF encoding as a parameter to fopen().
See which includes a reference to code I posted to detect UTF encoding.
See also where I posted code that uses this together with knowledge of what release supports what facility in order to read in UTF-encoded csv files and do a smart conversion to table form.
That said...
My interpretation was that the problem was likely to do with the fact that some countries use comma as the decimal point; and that datetime() can only handle limited forms of named month abbreviations and only if passed the right locale that was used in constructing the names of the months (which requires the user or code to know that information.) datetime() cannot, for example, handle using Mär or Mrz as a month name (German) see

Sign in to comment.

More Answers (0)


Find more on Get Started with MATLAB in Help Center and File Exchange





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!