columns and rows in text file
Show older comments
i want to export data from excel file to text file. in excel there are three columns with three rows first two columns contain fractional numbers with two decimal places, third column contains integers
with this piece of code
A = xlsread ('data_file.xlsx', 'Sheet1', 'A1:C10');
fid = fopen ('output.txt', 'w');
dlmwrite (fid, A, '\t' );
fclose (fid)
in the text file i get string 111.11 22.22 50111.12 22.23 50111.13 22.24 50
how should the code looke like to get this in the text file
111.11 22.22 50
111.12 22.23 50
111.13 22.24 50
Accepted Answer
More Answers (0)
Categories
Find more on Text Files 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!