2009 Jan 16 12:56 PM
Hi ABAPers,
Im using OLE to download entries from internal table to excel.
One of the entry in internal table is of length 18 i.e account no. = 123456789876543212,type c(18)
My problem is that when this entry get downloaded in excel it gets printed as exponent.
i.e1.23457E+17.
How can i print account no. in the same format.
please help.
thanks in advance.
regards,
Lokesh
2009 Jan 17 1:12 PM
Before pasting data into excel sheet set format of cells as numerical.
2009 Jan 19 1:37 PM
Hi Lokesh,
In OLE set the range of cells in which you have A/C number.
Say for example your A/C number is fourth column in your table, then
CREATE OBJECT wf_excel 'EXCEL.APPLICATION'.
...
* Set First row 4th column
CALL METHOD OF wf_excel 'Cells' = wf_cell_from1
EXPORTING
#1 = 1
#2 = 4.
* Get the number of lines of int table to determine
* last row
DESCRIBE TABLE <internal table> LINES lines
* Set last row 4th column
CALL METHOD OF wf_excel 'Cells' = wf_cell_to1
EXPORTING
#1 = lines
#2 = 4.
* Set the range here
CALL METHOD OF wf_excel 'Range' = wf_cell1
EXPORTING
#1 = wf_cell_from1
#2 = wf_cell_to1.
* Format the range of cells here
SET PROPERTY OF wf_cell1 'NumberFormat' = '@' .Regards,
Manoj Kumar P