MATLAB: Read data from CSV and Excel

appdesignercsvdataexcelMATLABxlsread

Right now I'm developing an app that uses the data from a CSV file generated by a machine. The problem comes when I try to read the file using xlsread. The code works perfectly when using the .xlsx version of the file. All the values are read correctly, i.e., 1.753 will be regarded as a decimal. However, when I select the .csv version the aforementioned number will be read as 1753 (one thousand blablabla).
[FileName,PathName] = uigetfile({'*.xlsx;*.csv'},'File Selector');
[~,~,rawdata]=xlsread(strcat(PathName,FileName));
This is the part of the code that I use to select and read the file. On both cases all the data is placed on a cell array which I feel confortable with.
Does anyone know how can I make it work with the CSV file?. (The columns are separated with ';') My guess is that it's a problem of the default separator of windows, but who knows…
Thanks in advance.

Best Answer

Learning how to use fread, fgetl and such functions solved my issue.