How do I export a matrix to an Excel file with a custom file name that can be typed in the command window?
Ältere Kommentare anzeigen
Hi everyone.
I am working on a research topic and need to export two matrices into Excel. The matrices can vary in size after a few scripts are run. Ultimately, I need to be able to export the two matrices to two Excel files with the ability for the user to type in any file name he/she wants.
I believe I have to save the file name typed in the command window as a string, then use the xlswrite() command to do it. Not sure where to start. Thanks!
Antworten (2)
Walter Roberson
am 9 Okt. 2012
[filename, pathname] = uiputfile('Where do you want it?");
completename = fullfile(pathname, filename);
xlswrite(completename, TheData)
Sachin Ganjare
am 9 Okt. 2012
0 Stimmen
name_xls1 = input('Enter XLS 1 name:', 's');
name_xls2 = input('Enter XLS 2 name:', 's');
status = xlswrite(name_xls1, MATRIX_DATA1);
status = xlswrite(name_xls2, MATRIX_DATA2);
Hope it helps!!!!
5 Kommentare
Russ
am 9 Okt. 2012
Walter Roberson
am 9 Okt. 2012
You would need to use an activex control for that.
Sachin Ganjare
am 9 Okt. 2012
You need to use ActiveX automation interface for doing that, refer below link for further details:
Hope it helps!!!!
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!