How to write string and numerical data to an excel file.
Mostrar comentarios más antiguos
Dear Sir/Madam,
I have a issue of saving mixed data to an excel file. The following is my code:
Title = {'CameraSN' 'BenchTime' 'GrayLevel' 'Mean' 'MAX' 'MIN' 'Particles' 'DetectTime'};
Output = [Title; CamFolder, BenchID, num2cell(G), num2cell(M), num2cell(MAX), num2cell(MIN), num2cell(N), num2cell(Time)];
xlswrite(strcat(OutFilePath,OutputFileName), Output);
Notes:
- "CameraSN" and "BenchID" are cell arrays
- The length of each element of each cell in these cell arrays is 8 and 32 respectively.
The code works fine, all data are saved expect the colum of "BenchID" is empty. However, if using "xlswrite('test9.xls', BenchID{1})", the data can be saved properly.
Could you help me figure out what happened when I saved all data at the same time into a spreadsheet?
Best regards, Tracy
Respuestas (1)
Tracy
el 21 de Feb. de 2013
0 votos
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!