Error using writetable - all columns get concatenated into a single one
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all!
I experience difficulties when I try to write my table back to an Excel File.
It seems to write all columns into the first column and I have no idea why.
I've already searched the internet and haven't found any similar problem so maybe you can advise me.
writetable(new_table,'C:\Users\Heindl\something\somethingelse.xls');
% This is the error:
Error using writetable (line 142)
Unable to write to sheet 'Sheet1' in file 'C:\Users\Heindl\something\somethingelse.xls'. Disable sheet protection, disable workbook's Mark as Final option, and ensure input does not exceed cell capacity.
Error in write_in_something (line 159)
writetable(new_table,'C:\Users\Heindl\something\somethingelse.xls');
The table in Matlab is around 100 by 100 but after writing it becomes a single 100 by 1 column. I am not allowed to post the table since it contains restricted research data, I'm sorry.
I should add, that I have already deleted additional 'iscategorical.m' files, which sometimes seems to help others with kind of similar problems.
Matthias
4 件のコメント
Guillaume
2019 年 8 月 13 日
Now, this is very confusing. How can a csv file (text file) have everything in one column?
In any case, best way for us to understand the problem is:
- a mat file containing the table (or a short version of it) you want to write
- the exact code you use to write it to a file.
With regards to the toolbox, you may be better off uninstalling it completely since it's probably broken without its own iscategorical.
Jonathan Havener
2021 年 8 月 31 日
I was having this issue as well. All columns were concatenated to a single column. Odly enough, if I only wrote certain subsections of the table to csv it worked fine. 7:1000 worked, but 6:1000 didn't work. 1:10 worked fine. I thought maybe it was a size of data, but could never find a discernable pattern. 7:2000 was fine as well.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!