Skip to Content
0
Former Member
Mar 21, 2014 at 11:12 AM

Error in using ABAP OLE wrong cell value

213 Views

Dear All..

I'm facing a problem while using ABAP OLE..

the problem is the ABAP OLE writes the wrong value in Excel file

the value is 121.000 but it written in Excel file : 121

the weird thing is .. other value of 9.000.000 written correctly in Excel File .. and also lots of other values..

i've trace the value until it goes to the method of :

CALL METHOD OF h_excel 'Cells' = h_zl
EXPORTING
#1 = i_row
#2 = i_col.
SET PROPERTY OF h_zl 'Value' = i_value.
GET PROPERTY OF h_zl 'Font' = h_f.
IF i_bold = 'X'.
SET PROPERTY OF h_f 'Bold' = 1.
ENDIF.

and the values of variable i_value is still correct which is : 121.000 but after writing in excel it becomes 121

i believe it will become faulty at the specific amount with format of XXX.000 because if I changed the value to 121.001 it displays correctly in Excel file..

i_value is a pass value from variable ld_val with data type of is --> ld_val(20) type n.

is this are originally bugs from the OLE ? how to solved it ?

please advice ..