Page 1 of 1

thousand separators - dated tables

Posted: Sun May 29, 2011 5:45 am
by carmomi
Hi,

I have produced some dated tables from group objects. I want to have thousand separators in the cells but the although the option is selected (Options/general options/spreadsheets/thousand separator - checkbox selected) the thousand separators are not made. As I'm processing many tables this is a minor issue that turns into a major issue due to the time required to put the separators manually when I copy the outputs to a word file.

Any hint on how to solve this problem is more than welcome.

Thanks
Miguel

Re: thousand separators - dated tables

Posted: Tue May 31, 2011 8:16 am
by EViews Jason
via the user interface:
1)freeze the dated data table
2)press ctl+a in the newly created table to select all cells
3)press the cellfmt button in the button bar
4)select the Thousands separator
5)press OK

Unfortunately via the command line or program it is more difficult, especially if 'auto format' is selected as the row default in the dated data table options. First your will need to freeze the output into a table. Then you have to know the current format of each row (currently there is no way of obtaining the format programmatically) and then call setformat on that row with the new format. For example,

Code: Select all

newtable.setformat(4) ft.2 'sets the 4th row numeric display format to 2 fixed decimals with thousands as separator
Alternatively, you could use

Code: Select all

newtable.setformat(@all) ft.2 'sets the display format for the entire table to 2 fixed decimals with thousands separator
Depending on your data, the problem with this is you may not want fixed decimal in all of your cells.