Change Excel Number Format From Matlab
Ältere Kommentare anzeigen
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 Kommentare
Jan
am 7 Okt. 2011
Please use proper code formatting, as explained in the "Markup help" link.
George
am 7 Okt. 2011
Fangjun Jiang
am 7 Okt. 2011
When you post your question, look at the {}Code button above the text box.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!