How can I add path in Matlab to read files csv and excel files from specific folder and read the data?
Show older comments
I want to add path in my script so that it can read and store csv and excel files in struct. I want to add "D:\AMXE132#03\200917\Duty-01\BL" or any path in script to access csv and excel files.
%my path D:\AMXE132#03\200917\Duty-01\BL
Also
I tried import data from csv file but it is detecting var 1 var 2.. Var 3 as header. Row 38 header is getting. How can solve the header reading issue
%Import the options of the csv file
opts=detectImportOptions('WT_ - 10-15.csv');
%Defines the row location of channel variable name
opts.VariableNamesLine = 38;
%Specifies that the data is comma seperated
opts.Delimiter =','; %Specifies that the data is comma seperated
%Read the table
t = readtable('WT_ - 10-15.csv',opts, 'ReadVariableNames', true);
1 Comment
All of the original comments are here:
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets 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!