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

EXCEL WORKBOOK ON APPLICATION SERVER IN BACKGROUND

Former Member
0 Likes
607

Dear Experts,

I have to download a file as excel workbook in background on application server.

I have used open / close data set using that I am able to download .CSV and Tab Delimated file(with extension as .xls) but not excel workbook.

Regards and Thanks,

Vikas

Dear Experts,

I have to download a file as excel workbook in background on application server.

I have used open / close data set using that I am able to download .CSV and Tab Delimated file(with extension as .xls) but not excel workbook.

Regards and Thanks,

Vikas

5 REPLIES 5
Read only

faisalatsap
Active Contributor
0 Likes
567

Hi, Patel

Please don't use All Caps in Subject Line

Please Have a Look [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]

Kind Regards,

Faisal

Read only

0 Likes
567

Thanks Faisal,

I have'nt seen rules of engagement before you told me the same.

Regards ,

Vikas

Read only

0 Likes
567

Hi Vikas,

what i understood is , u hav a excel file on presentation server (desktop) and want to upload it to the appln server. if so do the following :

step one : save the excel file with all the data u wanted in it.

step two : save as the excel file in tab delimited format.

step three : save as the tab delimited file in ansi .txt format.

Now cg3z to upload the text file (.txt) in appln server .

open the file as below:

DATA: begin of itab,

col1 type <>,

col2 type <>,

end of itab.

DATA : wa_itab like itab.

DATA: wa(100) TYPE c,

xeof(1) TYPE c.

PARAMETERS: p_file(30) TYPE c DEFAULT 'appln server path .txt' LOWER CASE

OBLIGATORY,

OPEN DATASET <p_file> FOR INPUT IN TEXT MODE

ENCODING DEFAULT.

IF sy-subrc NE 0.

WRITE : ' error opening the file "

EXIT.

ELSE.

DO.

READ DATASET p_file INTO wa.

IF sy-subrc NE 0.

xeof = 'X'.

EXIT.

ENDIF.

IF sy-subrc EQ 0.

PERFORM split_data.

ELSE.

EXIT.

ENDIF.

ENDDO.

CLOSE DATASET p_file .

FORM split_data .

SPLIT wa AT cl_abap_char_utilities=>horizontal_tab

INTO wa_itab-col1 wa_itab-col2 wa_itab-col3.

APPEND wa_itab TO gi_itab.

ENDFORM. " SPLIT_DATA

Read only

0 Likes
567

Dear Venkat,

Thanks for replaying.

I am not having excel file on presentation server, I want to download data from internal table as excel workbook(spreadsheet) in background on presentation server.

I am able to download the data from internal table as .CSV or Tab delimated file, but not able to download the data in proper excel workbook format(spreadsheet).

Regards,

Vikas

Read only

0 Likes
567

Hi Vikas,

I have also searched a lot on this for one of my assignment. But i couldn't find any. Acc to me, its not possible to download an excel file on application server.

Regards

Natasha Garg