cancel
Showing results for 
Search instead for 
Did you mean: 

How to put the data in Pre-formatted excel file and then downlaod it.

ChandraMahajan
Active Contributor
0 Kudos

Hi,

I have a requitrement to put the data in pre-formatetd excel file and then allow users to download this file.

1) where should i put the pre-formatted excel file? can i have it as MIME object? How should i read this file internally in the program?

2) How to put the data in particular cell number (e.g. B4, B5 etc) ?

Please let me know how should i proceed for this kind of requirment.

Thanks,

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandrashekhar,

You can use OLE Objects to do this.

Please check the following link:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204d1bb8-489d-2910-d0b5-cdddb322...

Also if you have time, you can refer example given in package SOFFICEINTEGRATION

ChandraMahajan
Active Contributor
0 Kudos

Hi All,

after searching lot on SDN, i found out that OLE concepts can not be used in WD ABAP environment. Please let me know if i am correct or not.

as of now, i am building the excel and using below method to create it.

*Create the Excel File

cl_wd_runtime_services=>attach_file_to_response(

i_filename = lv_filename

i_content = lv_xstring

i_mime_type = 'application/msexcel'

i_in_new_window = abap_false

i_inplace = abap_false ).

The problem in above method is that, i can not format the excel as i wanted. for e.g. i wanted to put values in particular cell, make it BOLD, italic etc.

Is there any way to achive this? Please let me know.

Thanks,

Chandra

Answers (0)