Application Development and Automation 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: 
Read only

Problem while downloading data in excel

former_member321825
Active Participant
0 Likes
2,965

Hi,

Data in one of o/p columns is 0E000 but when I download the alv o/p in excel the value comes as '0.00E+00'

I guess it is taking Char E as exponential and hence converting in excel.

Please provide me a solution so that i can get the data as 0E000 in excel.

Edited by: Rachel@sap on Apr 18, 2011 10:22 AM

6 REPLIES 6
Read only

Former Member
0 Likes
1,170

Hi Rachel,

The issue which you are discussing is related to excel. As per my knowledge & experience, you cannot do much about that.

In my opinion, just try to convince your client to put a (') at first position in the column which you are getting wrong output. In this way you can achieve the result. Even in my case I have made the client understand how to see the correct value in excel (i.e. by putting (') as the first character in the error column.

Hope this info will be sufficient to resolve the issue & close the thread.

BR,

Vinit

Read only

Former Member
0 Likes
1,170

Hi,

Whilw downloading change the file type as 'DBF'



CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = w_filename
    filetype              = 'DBF'                          "Use the file type as DBF
    write_field_separator = 'X'
  TABLES
    data_tab              = t_output.

Prabhudas

Read only

0 Likes
1,170

Hi Prabhu,

Thanks a lot. I am able to download the excel file as desired.

Just 1 query . what is full form of DBF????

Thanks & Regards,

Vinit

Edited by: vinit005 on Apr 18, 2011 1:43 PM

Read only

0 Likes
1,170

Hi Vinit,

'DBF' :

Data is downloaded in dBase format. Since in this format the data types of the individual columns are stored as well, you can often avoid import problems, for example, into Microsoft Excel, especially when interpreting numeric values.

Thanks and Regards,

Prakash K

Read only

former_member321825
Active Participant
0 Likes
1,170

Thank You.

I am downloading via ALV hence i am not using gui_download.

Could you please tell me how to resolve for alv download.

Read only

OleHombre
Explorer
0 Likes
1,170

Hi Rachel,

Try this.

Rather than using the 'Save to local file' option from ALV, opt for the Microsoft Excel/Spreadsheet button from the toolbar (CTRL+SHIFT+F7).

This will save in excel format.

Note: This download mode will not take into account any custom changes to subtotals/filtering/sorting etc.

You might also need to set the macro security options in excel to medium (for excel 2003) or tick trust VBA projects for macro settings in the excel trust center settings (excel 2007,2010 etc). Else you might receive 0K000 message for VEXCEL conversion.

See screenshot for details.