简体   繁体   中英

How to download .csv data in multiple excel sheets using java script?

How to download .csv data in multiple excel sheets using java script.

data1={"a":"shri","b"="Om"} should be downloaded in First sheet and

data1={"a":"Rahul","b"="Ajay"} should be downloaded in Second sheet and there is N:N relations between objects and sheets. It means number of objects equal to number of sheets. Is there any way to create multiple sheets in java script ?

`exportCsvTXLS(){
 //here is my conversion logic to put into multiple excel sheet
}`  

if you have answer using angular js then it is fine as well.
just I want to import multiple objects in multiple sheets.

这是我应该如何输出的简单示例。有两张纸都包含不同的对象

I never create Excel file directly in javascript.

You can send your data to your server and you build your Excel file from it. For example, your have an array of object in JSON, then you parse your JSON and build each sheet based on the objects in the array.

The result of the of the query must be the file generated which enable the user to download it.

It will probably be easier to create your Excel file from Java or C# than in Javascript.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM