clarketm / TableExport

The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
https://tableexport.travismclarke.com/
Apache License 2.0
888 stars 289 forks source link

Ignore Cols using variable #110

Open soapej opened 6 years ago

soapej commented 6 years ago

I'm trying to ignore a column with a variable that holds the index of the column, but it doesn't seem to work. Is this possible?

ex:

$('target').tableExport({ ignoreCols: count1 });

clarketm commented 6 years ago

@soapej – All else equal, the syntax you presented should work fine, as long as the variable holds the value of the column you want to ignore when tableExport is initialized. Here is the ignoreCols example from the docs to reiterate the appropriate syntax.

Note: If you need to modify the ignored columns at runtime (i.e. reparse the table when the variable changes) you can achieve that with the update() method. Here is the documentation for update.