How to export the output of a program into a new, specifically-located Excel file?

조회 수: 1 (최근 30일)
Mark
Mark 2014년 1월 30일
답변: David Sanchez 2014년 1월 30일
I would like to export the output of a program into an Excel file that is created, located, and filled all within the program. Is this possible?
Right now, I can only fill a pre-existing excel file using the following commands, but I get an error message (pasted below)
xlswrite(filename,variable);
winopen(filepath)
Warning: Could not start Excel server for export.
Thank you!

답변 (1개)

David Sanchez
David Sanchez 2014년 1월 30일
Write mixed text and numeric data to test.xls, starting at cell E1 of Sheet1:
my_file = "C:\my_docs\any_folder\test.xls"; % place where you want to save the *.xls
d = {'Time','Temperature'; 12,98; 13,99; 14,97}; % your data
xlswrite(my_file, d, 1, 'E1')
This should work no Windows Systems.

카테고리

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