cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert smartform output to excel format maintaining the layout xact

0 Kudos

Hi,

I have a smartform with some text fields, a logo and table. My requirement is to develop a WebDynpro application which will provide the option to the user to download and save the smartform output as excel file in the system. I have used FileDownload UI element to download the and save the corresponding pdf file from the smartform output but how to convert the pdf output to excel maintaining the exact layout (i.e logo, formatting etc. will have to be maintained)? I have searched the forum but could not find any satisfactory answer. Any suggestions please? Thanks in advance...

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Anirban,

Out which you are getting from smartform should be of type xstring.

use the below code to convert into excel

wdr_task=>client_window->client->attach_file_to_response(

**path to the word file

i_filename = 'WDP.xls'

  • String Variable

i_content = 'XSTRING Content'

  • File Type

i_mime_type = 'EXCEL' ).

Thanks

Bala Duvvuri

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Anirban,

> Out which you are getting from smartform should be of type xstring.

> use the below code to convert into excel

> wdr_task=>client_window->client->attach_file_to_response(

> **path to the word file

> i_filename = 'WDP.xls'

> * String Variable

> i_content = 'XSTRING Content'

> * File Type

> i_mime_type = 'EXCEL' ).

>

>

> Thanks

> Bala Duvvuri

I'm sorry, but this answer doesn't make any sense at all. File contents don't magically change between two completely different things just becuaswe you change the MIME Type or Fiel Extension.

The SmartForm is output in PDF. It doesn't just transform itself into Excel.

I'm afraid I don't have an answer for the orginal post. I would imagine it would be exceptionally difficult to convert from PDF to Excel and won't even know where to start given the vast differences between the formats. I would think it would be better to design an excel spreadsheet similiar to the form and just feed it the data via OfficeControl or something like that.