Export datatable to excel

1
0
-1

I have a form which displays records from the business data. I would like to have a functionality upon clicking which the entire data would get downloaded as excel.

Is there any way we can achieve so using Bonita.

4 answers

1
+1
-1

Hi,

As far as I know, Bonita doesn't provide an excel converter. You'll have to write it yourself in Java or Groovy.

Here is how I would do it :
- Make the button call a REST API on click, you'll need to create your own API exention
- Your API extension will generate the file, store it somewhere and send back an URL to download it.
- On your form, you can then use the URL to download the file

Note that generating excel files in Java is not trivial. There is a library called Apache POI that'll help you. Take a look at the quick guides and the examples provided by Apache.

Regards

Comments

Submitted by rajeshkhanna543... on Thu, 08/06/2020 - 08:01

Can you explain more on this?

1
0
-1

Hello,

You can use the ALASQL widget: it does what you look for.

https://community.bonitasoft.com/project/widgetalasqloperation

Best,

1
0
-1

You might consider just having excel in document control, not editable on a bonitaform but outside in pure excel.
That way people edit in pure excel which is desired perhaps. Perhaps use permissions and copies to keep people from editing where they aren't allowed..

I watched this video on documents which is how I might proceed. Disclaimer I am a newbie in Bonitasoft.
link

-JIm

1
0
-1

99% of downloads for excel come as a Comma-Separated Values (CSV) file.

Therefore you want a custom widget (button) to take the table data, create a document, which you can download onto the desktop.

Excel will easily then open this.

Also have a look at these posts

http://www.kubilayerdogan.net/javascript-export-html-table-to-excel-with-custom-file-name/
http://stackoverflow.com/questions/16078544/export-to-csv-using-jquery-and-html
http://jsfiddle.net/terryyounghk/KPEGU/
http://stackoverflow.com/questions/29599055/js-html-table-to-excel-file-download-ie

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Comments

Submitted by Sean McP on Tue, 01/19/2016 - 18:39

Or you could wait for 7.2 where there will be Office capability...create and edit Office documents in built to Bonitasoft.

regards

Notifications