Matlab corrupts excel file after/during read
5 ビュー (過去 30 日間)
古いコメントを表示
I am using xlsread command. It seems to corrupt the file. The first pass it reads the data perfectly. Up until now I have not had this issue. When I rerun the script I get the following error. When I open the excel file it is corrupted.
File \\Shared\Users\xx\Test_Data\yyy\xxxk\Jeff_Schlang\xxxa\SNo001\Noise_Source\Noise_data_parsed.xls not in Microsoft Excel Format.
Error in Read_Noise_Src_ENR_fct_revB (line 34) [enr,label]=xlsread(filedir,i) ;
I did not write or do anything to the file? this seems to be a new problem so I restarted the computer, but that did not correct the issue. Any ideas?
I am using Matlab 2015b & Excel 2016
0 件のコメント
回答 (1 件)
Jan
2017 年 5 月 8 日
編集済み: Jan
2017 年 5 月 8 日
Try to open the file in Excel. Does this work? If not, it looks like the file is corrupted. Restore it from your backup. Create a new backup for the otehr files you process with your Matlab script. Afterwards start to examine your code: It is unlikely that Matlab xlsread damages files. On one hand it opens the file for reading only, on the other hand it has been tested and used millions of times. Perhaps the hard drive is corrupted (check this), or you have an fopen anywhere in your code. Maybe another user has written to the file, or it is a malware attack?
I did not write or do anything to the file?
Obviously you or somebody else did.
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!