asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

[Help] How can I generate two tabs/worksheets for excel? #90

Open prady00 opened 9 years ago

rajansoft1 commented 9 years ago

This library is for making csv files and not excel file, i dont think their is any library for angular to convert json to excel

ghost commented 9 years ago

I want to export multiple csv files as a zip/rar on a button/anchor click ... how can i do that? I tried passing an array of arrays in ng-csv directive but it didn't work. please help.

shaohaolin commented 8 years ago

@asafdav I have modified the code to be able to generate multiple tables by passing an object. The object is format like this: var object = { array1: [ ], array2: []} I finished the implementation and unit test for the multi-csv feature. It's in my repo on the multicsv branch. Let me know what you think !

asafdav commented 8 years ago

Hi, can you add a test case and pull request? I'll checkout locally and test it

On Fri, Oct 16, 2015 at 4:29 PM, Shaohao notifications@github.com wrote:

@asafdav https://github.com/asafdav I have modified the code to be able to generate multiple tables by passing an object. The object is format like this: var object = { array1: [ ], array2: []} I wonder how I can do a demon for you?

— Reply to this email directly or view it on GitHub https://github.com/asafdav/ng-csv/issues/90#issuecomment-148716634.

codingquark commented 8 years ago

So I cannot export more than one table at this point. Is that right? If it is, is there some work around so that I can include some meta info such as filters applied etc at the top of the table/sheet?

codingquark commented 8 years ago

I have solved it by using a callback for ng-csv Ability to format the data however we want is useful. :)

DeepzSandra commented 7 years ago

i have also same issue can u please tell me!!

dtturcotte commented 6 years ago

@asafdav @shaohaolin Has the feature to export multiple tabs to CSV format been added? I'd like them to be able to open it in Google Sheets or something with:

col1  |  col2 |       col3  |      col4
-------------------------------------
1          4           7           10
2          5           8           11
3          6           9           12

-------------------------------------
[<current> csv sheet 1]  [csv sheet 2]  [csv sheet n] 
dtturcotte commented 6 years ago

@shaohaolin I cherry picked your updates for multi CSV. It doesn't create multiple tabs, nor does it take into account separate Header sets per dataset. Any updates there?

aarchsk commented 5 years ago

Hi , I am also looking for same feature multi csv, any updates?How do we achieve it?