How to set column width in exported csv to adjust the column data data length

Tags: #<Tag:0x00007efc651b1c88> #<Tag:0x00007efc651b1b48>

How to set column width in exported csv to adjust the length of max data length in the column or if not then maybe set column to a fixed size.

Hi @vishal.ghadigaonkar

Thank you for contacting us. Did you try setting the columns width with colWidths option? It allows to set the fixed width for all the columns or to set it separately with the array of values. Here’s an example of the first solution:

https://jsfiddle.net/handsoncode/68mw1ar4/

I exported the table to CSV and it looks that the columns width settings are being also saved.

Hi @adrian.szymanski ,
Thank you for replying
I think setting colWidths modifies the UI columns making the table on UI scrollable horizontally which i have to maintain & have to modify the one’s in CSV file . colWidths doesn’t seems to be modifying the CSV file’s column width.
Thank you !

Hi @vishal.ghadigaonkar

Modifying the columns width with colWidths is the only way we currently have. We don’t have the possibility to set this value in a configuration options of our CSV exporter.

Thank you ! @adrian.szymanski