xlswrite without losing precision
2 ビュー (過去 30 日間)
古いコメントを表示
I have a cell array. When I use xlswrite to save them in an Excel file, it will lose precision at some decimal place. For example, if the cell is 191863214069, it will be 191860000000 in Excel.
What I want is to export data as exactly same as it is in Matlab. Anyone knows the solution?
Thanks!
0 件のコメント
回答 (1 件)
Anand
2013 年 8 月 24 日
You should not be seeing that. I tried the following and the Excel cell shows me the full value:
>> x
x =
1.9186e+11
>> xlswrite(filename,x)
When I open the Excel file I see the value of x with full precision. Maybe you didn't store the value as a double. Check the class of the variable you are exporting.
>> class(x)
2 件のコメント
Anand
2013 年 8 月 27 日
Look at the cell value in the top cell and you will the value in full precision.
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!