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

How to create excel header row using I_OI_SPREADSHEET?

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,260

Hello SDNers,

I am using the interface I_OI_SPREADSHEET to create an excel with multiple worksheets.

I'm not able to set a header for the excel file using this interface? I tried the method SET_HEADER( ), but i don't understand what do you pass to the table SOI_HEAD_TABLE

Anyone ever used this method to build the header or is there any other workaround?

Thanks for your help!

BR,

Suhas

PS - I am able to download the line items properly, so please don't refer to posts on how to use this interface. I'm stuck with the header row only!

Hello SDNers,

I am using the interface I_OI_SPREADSHEET to create an excel with multiple worksheets.

I'm not able to set a header for the excel file using this interface? I tried the method SET_HEADER( ), but i don't understand what do you pass to the table SOI_HEAD_TABLE

Anyone ever used this method to build the header or is there any other workaround?

Thanks for your help!

BR,

Suhas

PS - I am able to download the line items properly, so please don't refer to posts on how to use this interface. I'm stuck with the header row only!

4 REPLIES 4
Read only

naimesh_patel
Active Contributor
0 Likes
1,028

Hello Suhas,

It looks like method SET_HEADER, generates the HEADER while putting that in the Excel worksheet. This HEADER is the header table which is generally printed for additionally information rather than the column headings.

Check method SET_HEADER_FOR_OI of class CL_GUI_ALV_GRID_BASE, which inturn being called from SET_HTML_HEADER of class CL_GUI_ALV_GRID. Here the table IT_HEADER is the header table set by REUSE_ALV_COMMENTARY_WRITE.

Regards,
Naimesh Patel

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,028

Hello Naimesh,

Sorry for the late response, i thought i had replied back

So if i understand correctly you're saying that the method SET_HEADER( ) won't help! So how do we place a header row using I_OI_SPREADSHEET.

BR,

Suhas

Read only

0 Likes
1,028

Hello Suhas,

Haven't tried to do this but it should be possible as ALV framework uses the I_OI_SPREADSHEET to generate the view in XLS.

Regards,
Naimesh Patel

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,028

ALV framework uses theI_OI_SPREADSHEET to generate the view in XLS.

Thanks Naimesh for pointing this out!

I remember that i had published a WiKi on how to use the function ALV_XXL_CALL to generate decent XLS file(s).

After lil' bit of code digging i found the method call I_OI_SPREADSHEET->INSERT_FULL( ).

I'll keep you updated.

BR,

Suhas