Want Dynamic Header of excel while exporting into Excel

I want the currency symbol in Exporting the data in excel. My application is a multitenant application. I am passing a structure for export excel. In the header, I want the currency symbol according to the tenant.

Right now I am passing it. But for another tenant, I have to struggle.

Hi Divya,

Create a site property for the currency symbol in the espace and set is multi tenant to yes. And from the service center you can set the symbol for each tenant.

Use the site property to set the symbol in the export excel logic.then outsystems platform will do the rest based on the tenant id

Hope this will help you.

Regards,

Koushik

Hi Divya,

To change the header value (which is the structure's field name by default), you can use an extension like Advanced Excel from the forge to change the header's value manually with the correct currency symbol.


Regards,
Lennart

Koushik Prathi wrote:

Hi Divya,

Create a site property for the currency symbol in the espace and set is multi tenant to yes. And from the service center you can set the symbol for each tenant.

Use the site property to set the symbol in the export excel logic.then outsystems platform will do the rest based on the tenant id

Hope this will help you.

Regards,

Koushik


I have tried this but that structure label is not taking it .

Hello Divya, 

Justo to expand Lennart answer. 

An attribute label (be it from an entity or structure), is defined at design time, and it will be the same on all tenants (Afaik). This means there is no way to 'automatically' change this based on the Tennant. 

So, what Lennart is proposing is the following:

1. Create your excel normally 

2. Use one of the components at forge that allows you to manipulate Excel. Usually the steps will be:

A) open excel (from binary returned by RecordListToExcel statement) 

B) Change the cell you want to change. I would recommend to append the symbol to the original label. So, do not add the symbol at the label of the structure attribute. 

C) save and close the excel. 

3. Download the file. 

If you search, you will find components and examples on how to use them, for sure. If not, we can help. 

Cheers