Converting from comma delimiter to semicolon
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();
Answers (1)
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
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!