xlswrite too large imput
Mostra commenti meno recenti
Hi everybody.
I' trying to save a very large cell matrix (1 393 120 x 15) to a xlsx, but xlswrite returns: 'The specified data range is invalid or too large to write to the specified file format. Try writing to an XLSX file and use Excel A1 notation for the range argument, for example, ‘A1:D4’.' Does anybody knows how could I do this?
Thank you!
PS: my code is xlswrite('C:\Users\***\CompresorCompleto.xlsx',DatosTot.raw); where * are the full path (and it's ok, I check it) and DatosTot.raw is the matrix I want to write
3 Commenti
vani srikanth
il 9 Set 2017
Check if you are using a large name for the tabsheet in xlswrite command. Having too large name for tab sheet also generates similar error.
eg: xlswrite('filename.xlsx',data,'tab_sheet_name');
Walter Roberson
il 9 Set 2017
But 1393120 is more rows than is supported by Excel.
Gaurav Kumar
il 20 Apr 2019
Dont forget to put extenstion after name of file
eg if file is xyx then write command as 'xlswrite("xyz.xlsx", data);
Hope it works for you. It worked for me. All the best
Risposta accettata
Più risposte (2)
Jan
il 20 Giu 2017
The documentation explains:
Input matrix, specified as a two-dimensional numeric or character array, or, if each cell
contains a single element, a cell array.
Does this match your DatosTot.raw? If so, there must be another problem. Let's ask an internet search engine for the maximum number of cells in an Exel column:
Excel 2007, 2010 and 2013 support 1'048'576 rows (2^20)
This means, that an XLSX file cannot carry 1'393'120 rows.
Seyedali Mirjalili
il 28 Gen 2018
1 voto
I had the same issue and managed to fix it. I was trying to create a file that did not exist in the path. So, I created the file manually and surprisingly the error disappeared. Sounds like magic, but it worked for me every single time.
1 Commento
Yixin
il 30 Lug 2023
Thanks a lot!It works on my computer.
Categorie
Scopri di più su Spreadsheets in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!