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

update xls sheet

Former Member
0 Likes
718

Hello,

My need is to update from SAP some cells of an existing xls(template) sheet/tab named "data".

I will have a second sheet "report" based on thisone so that why I must automatically do:

- open xls

- update tab/sheet "data" (cells A1, a2, a3, a4... etc)

- rename the xls

- close it.

does anyone have a small piece of code to do that?

I already did it in the past but I don't find the report I did in!

Thanks for your help.

Pascal.

Hello,

My need is to update from SAP some cells of an existing xls(template) sheet/tab named "data".

I will have a second sheet "report" based on thisone so that why I must automatically do:

- open xls

- update tab/sheet "data" (cells A1, a2, a3, a4... etc)

- rename the xls

- close it.

does anyone have a small piece of code to do that?

I already did it in the past but I don't find the report I did in!

Thanks for your help.

Pascal.

3 REPLIES 3
Read only

roberto_vacca2
Active Contributor
0 Likes
624

Hi .

I suggest you to use this guide.

Is very powerful and useful for your kind of purpose.

http://www.erpgreat.com/abap/abap-object-oriented-spreadsheet-with-unlimited-power.htm

If you need to implement it, contact me. Hope to help.

Bye.

Robert

Read only

0 Likes
624

Hi Roberto,

Thanks for the answer.

I took a look into the link you gave and it talk about attachement..

--ZJNCEXCEL_Test.ab4 is the Test Program

--ZJNCEXCEL_FUNC.ab4 is the Function Group

-- ZEXCEL_WRITEUP.txt is this write-up

but i don't find them in the link: normal?

Read only

0 Likes
624

There aren't attached files.

When I read about it I followed the instructions to better control my final code.

Well I suggest you to do the same thing as you will be able to choose what you need and what you don't need.

Paste TOP Level code into LZUTILTOP

Create 4 Functionn Modules  as described
ZJNC_START_EXCEL.  <-Start application
ZJNC_ADD_SHEET.  <-add/select sheet
ZJNC_ADD_RANGE. <-Select range columns/rows
ZJNC_ADD_TABLE <- Add table data

That's a suitable packet to use for furthers needs.

Anyway you could implement the I_OI_SPREADSHEET interface and the i_oi_document_proxy interface, declaring all the data you need.

You need quite the same time for both solutions. There's not a simple solution. You must manage the interface between SAP and Excel.

Methods you need are: SET_SHEET_NAME, SELECT_SHEET, SELECT_RANGE, SET_RANGES_DATA.

If you want much more help, I can give you some tips as you realize the implementation.

Hope to help.