how to use range that can change in xlswrite?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
if I write a function that creates a sturcture that can change sizes in different calls. and I want to put this structure in xl starting from B1(cause in A1:A4 THERE IS SOMETHING ELSE), but I don't know the end of the range since the structure can change it size - is there a way of doing so?
0 Commenti
Risposte (1)
Image Analyst
il 4 Gen 2014
ilona, you probably just forgot to give the sheet name when you called xlswrite. Or you didn't construct the full cell reference range like 'B1:H9'. Try this code:
myStructure.array = rand(10,3) % Make sample data in a structure.
% You must give a sheet name unless you want to
% figure out where the lower right corner of the array would go.
% To do that you'd need ExcelCol.m in the File Exchange
% If you give sheetName, you can give just the upper left cell.
sheetName = 'Results'
xlswrite('test.xlsx', myStructure.array, sheetName, 'B1')
0 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!