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: 

Looking for the best technique to download an excel file from an it

former_member1161170
Participant
0 Kudos

Hi experts.

Iu2019m trying all the downloading techniques to get an excel file, but no one fully satisfy my needs. I need to download in background and not directly by gui, and if it is possible I wish a neat file.

1) OLE2 is fantastic, I can define the fonts for every cell, but it opens the excel program: can it work in background?

2) The same problem is about EXCEL_OLE_STANDARD_DAT: it opens the excel program and Iu2019m not sure it can work in background

3) GUI_DOWNLOAD doesnu2019t open excel program, but it achieve an ASCII file: itu2019s another type. It is not very beautiful to open and to work by

4) SAP_CONVERT_TO_XLS_FORMAT doesnu2019t work with excel 2007

Are there other automatic techniques, which donu2019t open the excel program?

Thanks for your help

1 ACCEPTED SOLUTION

former_member189059
Active Contributor
0 Kudos

Hello,

Check the blog below

/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using-xml

It uses xml to create an Excel file.

The example provided downloads the file to the frontend at the end, instead of that, you can write it to the application server using open dataset.

6 REPLIES 6

former_member214857
Contributor
0 Kudos

Hi

1-2) It is not possible use OLE objects in backgroud. When you define the object with "CREATE OBJECT" it does not recognize

its registry on the server. It only works in Dialog mode.

3-4) Another technique is open excel file as required in notepad for instance and wirte a program to generate the same

strucutre with your values. It usually generate a XML file and you can write tags for it.

Also you can use OLE to use API functions, but it will work only in Dialog mode.

Kind regards

Carlos Machado

Edited by: Carlos Machado on May 20, 2010 7:02 PM

0 Kudos

> 1-2) It is not possible use OLE objects in backgroud. When you define the object with "CREATE OBJECT"

> it does not recognize its registry on the server. It only works in Dialog mode.

>

>3-4) Another technique is open excel file as required in notepad for instance and wirte a program to generate

> the same strucutre with your values. It usually generate a XML file and you can write tags for it.

>

>Also you can use OLE to use API functions, but it will work only in Dialog mode.

It's clear now.

Thank you.

Former Member
0 Kudos

how can you download in background? No presentation server (GUI) is available. Are you storing on apps server, then transferring to desktop?

When downloading with GUI_DOWNLOAD, I've always created a tab-delimited file named with .xls, or a comma-delimited (.csv) file, but advised users to open with Windows Explorer, so that the file will pop into an Excel worksheet via the automatic execution of the import wizard. Opening with Excel is a pain to be avoided with these files. The only drawback is that the users have to remember to change the file type to Excel worksheet when saving... I haven't looked at how this works with Office 2007 versions, but I would expect that it would work as it did in previous versions.

former_member189059
Active Contributor
0 Kudos

Hello,

Check the blog below

/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using-xml

It uses xml to create an Excel file.

The example provided downloads the file to the frontend at the end, instead of that, you can write it to the application server using open dataset.

0 Kudos

>Check the blog below

>/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using-xml

It's fantastic!

I suppose XML is the final solution, but now I've s problem.

In the main server I have the 4.6c, and it can't find "CALL TRANSFORMATION" as a valide instruction.

It isn't a problem: i must use it in another server (BW) with 6.20. It recognizes "CALL TRANSFORMATION" but it doesn't recognize STRANS tcode:

http://help.sap.com/abapdocu_70/en/ABENTRANSFORMATION_EDITOR_GLOSRY.htm

Is it possible?

How can I write the ST program code?

Thanks you very much!

0 Kudos

>

> >Check the blog below

> >/people/naimesh.patel/blog/2009/02/10/abap-and-excel--create-formatted-excel-using-xml

>

> It's fantastic!

> I suppose XML is the final solution, but now I've s problem.

>

> In the main server I have the 4.6c, and it can't find "CALL TRANSFORMATION" as a valide instruction.

> It isn't a problem: i must use it in another server (BW) with 6.20. It recognizes "CALL TRANSFORMATION" but it doesn't recognize STRANS tcode:

> http://help.sap.com/abapdocu_70/en/ABENTRANSFORMATION_EDITOR_GLOSRY.htm

> Is it possible?

> How can I write the ST program code?

>

> Thanks you very much!

I'm not too sure if it can be done in this case, but maybe you can try transporting it from another system which has the component.

The package name is SXSLT_TOOL.

Open the package in SE80, right click -> write transport entry.

Not too sure about dependencies though.