Exporting to excel on native app

Hi,

https://success.outsystems.com/Documentation/How-to_Guides/Data/How_to_Export_Entity_Data_to_Excel

According to the guide above, in order to export a list to excel, I will have to add a download widget after the export to excel widget. However, in the native app, there is no download widget. Is it still possible to export to excel on a native app?

Hi Jolene,

You can create web application to your enviroment and add dependencie to table in your mobile app where you store excel file. Then create blank screen with fileid input parameter and add getting and downloading file to preparation.Also add an external link in your mobile app to the web app screen and add to this link file id as parameter.

You can use the File plugin to download the file to the device, then you can use the file viewer plugin to open the file you just downloaded to the device.

https://www.outsystems.com/forge/component-overview/1633/file-plugin


https://www.outsystems.com/forge/component-overview/1606/file-viewer-plugin

Bas de Jong wrote:

You can use the File plugin to download the file to the device, then you can use the file viewer plugin to open the file you just downloaded to the device.

https://www.outsystems.com/forge/component-overview/1633/file-plugin


https://www.outsystems.com/forge/component-overview/1606/file-viewer-plugin

Hi Bas de Jong,

How do i link the export to excel widget to the File Plugin? I dont really understand how to use the file plugin and the file viewer plugin. 


Daryna Kravets wrote:

Hi Jolene,

You can create web application to your enviroment and add dependencie to table in your mobile app where you store excel file. Then create blank screen with fileid input parameter and add getting and downloading file to preparation.Also add an external link in your mobile app to the web app screen and add to this link file id as parameter.

Hi Daryna,

Thanks for your suggestion. However, i am having trouble understanding it. After the "export to excel" widget in the server action, what happens? Is an excel file being created ? and where is the file located after being created? Im quite confused about the process of the creation of the excel file. 


Jolene Kwek wrote:

Bas de Jong wrote:

You can use the File plugin to download the file to the device, then you can use the file viewer plugin to open the file you just downloaded to the device.

https://www.outsystems.com/forge/component-overview/1633/file-plugin


https://www.outsystems.com/forge/component-overview/1606/file-viewer-plugin

Hi Bas de Jong,

How do i link the export to excel widget to the File Plugin? I dont really understand how to use the file plugin and the file viewer plugin. 


Hi, 

Give the server action an output parameter of data type "binary" and map the excel file to it. Then it will be available in the context of your mobile app and you can pass that on to the plugins.


Bas de Jong wrote:

Jolene Kwek wrote:

Bas de Jong wrote:

You can use the File plugin to download the file to the device, then you can use the file viewer plugin to open the file you just downloaded to the device.

https://www.outsystems.com/forge/component-overview/1633/file-plugin


https://www.outsystems.com/forge/component-overview/1606/file-viewer-plugin

Hi Bas de Jong,

How do i link the export to excel widget to the File Plugin? I dont really understand how to use the file plugin and the file viewer plugin. 


Hi, 

Give the server action an output parameter of data type "binary" and map the excel file to it. Then it will be available in the context of your mobile app and you can pass that on to the plugins.


Hi Bas de Jong,

I tried doing it, however the output of the "Save File" action from "FilePlugin" is that "cordova is not defined". How do i go about solving this? 


Hi,


Are you testing this in a native app or in OutSystems now?

Otherwise Cordova plugins are not available.


Bas

Bas de Jong wrote:

Hi,


Are you testing this in a native app or in OutSystems now?

Otherwise Cordova plugins are not available.


Bas

Hi Bas,

This is a native app and currently i am using the "test in browser" function from outsystems service studio 11.


Then you have to generate a native app and test it on your mobile device. Cordova plugins are not available in your browser.

Also make sure that you do something with the results of the IsCordovaDefined action. Now you perform a test but don't act on the results.