Page 1 of 1

is there a way to do a WYSIWYG? or a bug?

Posted: Thu Nov 02, 2006 12:46 pm
by Guest
is there a way to program a wysiwyg? when reading a excel file i always get the correct value with highest precision. but values that are formated with lower precision are rounded.

example: 11,495 -> rounded to 11,50 (in excel UI)

can i somehow access this rounded value? or how do i achieve reading the value visible in Excel not the exact one? or how do i get the precision to round?

thanks in advance

Posted: Thu Nov 02, 2006 5:25 pm
by larsa
Hello

If you uses AsFmtString you shall get the formatted value.


Lars Arvidsson

Posted: Thu Nov 02, 2006 7:51 pm
by Guest
i get the correct decimal positions, but the value is not rounded as in excel. if a cell is formatted to show only two digits but has indeed three digits with AsFmtString i get a wrong value.

example:
in excel the cell value is 11,495
it is formatted to only use two digits and shows 11,50 in excel

when i use AsFmtString i get 11,49

seems to be a bug? isnt it?

Posted: Fri Nov 03, 2006 9:47 am
by Guest
OK. I located the problem.

Excel is rounding a value 123,5 up to 124. this is common in business. the component XLSReadWriteIII is not rounding up before 123,6. this is common in math.

i think this should be corrected?

thanks in advance