Atiq Shaikh
Atiq Shaikh

Reputation: 1

Export array to excel xlsx in javascript

There is one requirement in javascript to export the data (array or array of objects) to excel xlsx. I already exported the data to csv but unable to do same for xlsx. I tried many api from github so that I can used the libraries and export it to xslx but there are little help for it. I tried using stephen-hardy/xlsx.js, SheetJS/js-xlsx etc.

For exporting to csv I used this Click here! but the same cant be done for xlsx.

I tried xlsxwriter also to convert and write javascript array or array of object to xlsx but no result.

Now I m badly stuck because of the requirement. I also found out the similar post as of mine requirement Click here!

Please guys give me solution if any

Upvotes: 0

Views: 19980

Answers (2)

user3902443
user3902443

Reputation: 39

Try excelbuilderjs, I have done the same of downloading a Json Object with array of items into an excel sheet using this library.If you can please share the code on Jsfiddle, i can take a look at it and help you out

http://excelbuilderjs.com/

Upvotes: 0

Mike Gledhill
Mike Gledhill

Reputation: 29151

A while ago, I wrote the following article, which described how to export data from a jqGrid to a "real" .xlsx file:

Export jqGrid to Excel

This basically cached the jqGrid's data into a JavaScript variable, posted it back to a server, to save into Excel. The Excel file is created using the OpenXML libraries.

This should point you in the right direction.

Alternatively, you might like to try this library:

AlaSQL

(I haven't tried this though.)

Upvotes: 1

Related Questions