cancel
Showing results for 
Search instead for 
Did you mean: 

Export to excel using value set

Former Member
0 Kudos

Hi all,

I have an ALV table and in some columns I show the texts defining value_set (set_attribute_value_set). When I export the table to Excel using the standard button in the file I can see the codes, not the defined texts. How can I solve it? I thought about defining additional columns which will contain the texts and will be invisible in the screen and visible in Excel sheet instead of the column with codes, but I would like to know if there is any easier solution.

Thank you,

Anna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If your texts are unique, make the text itself as both value and text in the attribute value set. But it would work only if uniqueness is guaranteed!

Former Member
0 Kudos

Thank you. The problem is that I need to keep my value set as I have at the moment, because my table is editable and I have to maintain the codes internally. The text only should be visible in the screen for the user (it works fine thanks to the defined value set) and in Excel (it doesn´t work, the codes appear).

Regards,

Anna

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

You can use Filedownload control to download the content you prepare as XML

reading the context.

For Ex: if you have product ID, Product Name and price as attributes.

you can create the XML string as

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<products>

<product>

<productID>1234</productID>

<productName>Sony</productName>

<price>1234.00</price>

</product>

<product>

<productID>1234</productID>

<productName>Sony</productName>

<price>1234.00</price>

</product>

</products>

copy paste this in note pad name the file as products.xls and open it in MSXL.

similarly you can read the context and form this xstring and just supply to filedownload control.

Regards

Abhimanyu L

Message was edited by:

Abhimanyu Lagishetti