Customized Export To Excel

Customized Export To Excel

  

Hi All,

I want to implement the functionality were I want dynamic selection of Attributes of the Entity for export to Excel.

First i want to select the fields I would like to export from the list page and on bases of the selected fields from the list page, I want to export an excel having data only for selected fields.

I tried For "Each loop" to make string of all selected column and then pass it to advance query for getting list of selected fields, but unfortunately that doesn't worked well for me.  


Any help will be appreciated !


Best Regards,

Gaurav

1) You will need an expand inline parameter to build the query

2) A structure (record) to save field names and another structure (list, query output) with field values

3) I think you will need to build an extension that receive those structures and generate excel file.

Check this component http://www.outsystems.com/forge/component-details/355/Advanced+Excel/, probably will provide some functionalities you need

Hello Gaurav,

Yes it is possible..

Hey Gaurav,

Nice to see you in Forum , 

Just download Advance excel extension and open it in Visual studio using integration studio , i want you to do this just for getting an idea that how the extension has been written and how could you make change in it in order to customize it more.



Regards

-PJ- 

Rajat Agrawal wrote:

Hello Gaurav,

Yes it is possible..

How?


Hi Gaurav,

I want to implement the functionality were I want dynamic selection of Attributes of the Entity for export to Excel.

First i want to select the fields I would like to export from the list page and on bases of the selected fields from the list page, I want to export an excel having data only for selected fields.

Out-of-the-box this is not possible using the OutSystems RecordListToExcel, because the choice of columns to convert to excel is done at design time.

Just download Advance excel extension and open it in Visual studio using integration studio , i want you to do this just for getting an idea that how the extension has been written and how could you make change in it in order to customize it more.

PJ's approach might work, using one of the existing Excel extensions, but, like he mentions, you will need to modify the extension so you can pass it the full set of columns (you cannot define a dynamic input parameter structure that sometimes has 3 attributes others 7 attributes and others 12 attributes), and the extension logic needs to be able to understand which have relevant data, so it can decide what columns need to be converted into the Excel file.

It is possible to do this with the Advanced Excel component. The component does expose functions to select specific rows-cell combinations. If you apply the correct logic, you should be able to build a generic action to achieve this. 

I have built something similar but will need to anonymize it before I can share it.