Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

problem while downloading to excel

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

Before pasting data into excel sheet set format of cells as numerical.

Former Member
0 Kudos

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