Change Excel Number Format From Matlab
21 ビュー (過去 30 日間)
古いコメントを表示
Hi
How to change excel number format to 2 decimal places from matlab using actxserver?
For example:
e = actxserver('Excel.Application');
eWorkbook = e.Workbooks.Add;
e.Visible = 1;
eSheets = e.ActiveWorkbook.Sheets;
eSheet1 = eSheets.get('Item', 1);
eSheet1.Activate;
eActivesheetRange = e.Activesheet.get('Range', 'A1');
eActivesheetRange.Value = 0.022432;
eActivesheetRange.NumberFormat = ????
I want excel to displa 0.02
Thanks
George
3 件のコメント
Fangjun Jiang
2011 年 10 月 7 日
When you post your question, look at the {}Code button above the text box.
採用された回答
Fangjun Jiang
2011 年 10 月 7 日
eActivesheetRange.NumberFormat='0.00'
6 件のコメント
Fangjun Jiang
2011 年 10 月 7 日
Okay, maybe that's a MS Office version thing.
I never had experience plot to Excel via MATLAB.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Use COM Objects in MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!