| poldem 2007-04-23, 7:55 am |
| I am using softmasters templates to create excel workseet already for a long
time.
In my latest application I need to show several numbers, compute the sum and
show the result
in numeric form with comma as the decimal separator
After setting a numeric value to a column of cells I also set a sum formula
to
compute the sum of the column in the lowest cell.
This works ok.
After this I would like to set the format of these cells to
two decimal places with comma as a decimal separator
(@n12`2 in clarion)
I tried to do it with the SetNumberFormat(MSExcelClass) method, but the
results are very strange - I got 3 or 4 decimal places when setting the
fields
individualy
MSExcel2.SetNumberFormat('##.##0,00')
I changed this with one call for the whole range of fields SetNumberFormat
(STRING Range, STRING Format),
but the result was strange - teh number of decimal places varied, some
fields even had two consecutive commas.
There must be somthing I am doing wrong - maybe the number picture ...
Execel has aslo a special command for this - Comma Style, which applies such
formatting to the whole column at once,
but I found no reference in the documentation.
Any ideas ?
|