Converting from comma delimiter to semicolon
48 views (last 30 days)
Show older comments
I am reading a semicolon-delimited CSV file and after selecting rows I need to save these in another semicolon-delimited file, but MATLAB saves them using comma as a delimiter. Is there any workaround to this ?
GinestousPres = readtable("GinestousPres.csv");
idx = (GinestousPres.Date >="27/08/2021") & (GinestousPres.Date<"30/10/2021");
T = GinestousPres(idx,:);
%Write it in a ; separated file
results = GinestousFinal();
0 Comments
Answers (1)
Voss
on 15 Jun 2022
type test.csv % initial comma-delimited file
T = readtable('test.csv'); % read to table
writetable(T,'test_semi.csv','Delimiter',';'); % write table with semicolon delimiter
type test_semi.csv % final semicolon-delimited file
0 Comments
See Also
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!