Export datatable to excel

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.

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.

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

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

Hello, 

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

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

Best,

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

regards

Can you explain more on this?