Save a Table as a .csv in a Specified Folder
39 views (last 30 days)
I followed this post about saving a table to a specific folder, but am not having any luck.
Here is the code I have:
save_table ='C:\Users\Folder Path\Data';
table_path_format = [save_table 'Name_of_File.csv'];
where T is a 90 x 8 table.
Am I skipping a step?
I as also looing at this post about the writetable command.
Adam Danz on 8 Nov 2022
Edited: Adam Danz on 8 Nov 2022
The accepted answer in the question you followed uses fullfile to construct the file path. That's much safer than constructing the file path by concatenating char vectors (like you're doing). Your table_path_format is missing a file separator character. fullfile adds that for you.