Page 1 of 1

Precision control for table.save

Posted: Fri Feb 10, 2012 4:04 am
by Ravi
Hi folks,
I am searching for a mechanism to control precesion of numeric values when I execute

Code: Select all

table.save temp.csv
I searched and found some option in wfsave, but I want to save just a single table object and not the entire workfile

Any help will be appreciated

Re: Precision control for table.save

Posted: Fri Feb 10, 2012 8:33 am
by EViews Jason
You can save using full precision via the 'f' option. For example,

Code: Select all

mytable.save(f) myfile 'save mytable to a csv file named myfile.csv with full precision
If you want to specify the precision, change the precision for all your cells in the table using the table 'setformat' command and then save. For example,

Code: Select all

mytable.setformat(@all) g.5 ' change formatting in all the cells in table to use 5 significant digits

Re: Precision control for table.save

Posted: Fri Feb 17, 2012 3:50 am
by Ravi
Thanks Jason.
Your suggestion worked fine