필터 지우기
필터 지우기

Create .csv output with 'sheets' like excel?

조회 수: 35 (최근 30일)
kschau
kschau 2013년 6월 11일
댓글: Walter Roberson 2022년 6월 26일
Hey all
I am compiling a standalone executable to import .csv files, perform operations, compile the results, and export the results to an excel file, with different sheets that are labeled
CH1 CH2 CH3 etc.
This works great, I use xlswrite to write to sheet 1, 2, 3 etc. then use the
'actxserver('Excel.Application')'
to rename sheet 1, 2, 3 etc to the appropriate name.
This works fine, except if the computing running the executable does not have excel (rare as that would be, they exist in my universe) and the 'actxserver' is stopped in its tracks because it has no Excel Application to discover.
Is there a way to just write a .csv file with 'sheet' names instead that will be essentially the same thing when opened on a computer with excel or some other application?
Thanks for the advice as always
kyle
  댓글 수: 3
Walter Roberson
Walter Roberson 2022년 6월 26일
csv file format does not support sheets
Walter Roberson
Walter Roberson 2022년 6월 26일
These days you would usually use writetable() or writematrix()

댓글을 달려면 로그인하십시오.

채택된 답변

Iain
Iain 2013년 6월 11일
Simple answer: No. CSVs are plain text files and there is way to split them into sheets.
Complex answer: If you save a CSV per sheet, then you can actually write a VBA program which will open the entire set of CSVs, and collate them into a single spreadsheet.
  댓글 수: 1
kschau
kschau 2013년 6월 11일
That's what I figured. Just easier to make them use excel then.
Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by