I have a problem with hidden columns in Excel.
It exports me hidden columns as visible but with the width = 2.
is there way to configure this to don’t show hidden columns at all ?
I found some configurations of pdf:
mygrid.toPDF(url, “color”, true, true, rows);
rows - the list of cells’ IDs. If the option is not set, all the rows will be exported.
mygrid.toExcel(url, "color", true, true, ["id", "short", "name"]);
Does this extended config work also at excell ?
Or maybe I use wrong syntax of cell list ?!?
Parameter rows works probably. But it sets list of rows, not columns.
If to talk about columns - if column is hidden on client side by method setColumnHidden() it will be hidden in PDF and Excel.
Could you provide screenshots or explain in details what do you mean, please?
Sorry - my error with this parameter. I thinked about columns, but it is to limit rows.
When column is set as hidden in grid, when I export it, I get an xml with column configuration <column … width=“2” … />
After generating - column in excell/pdf is hidden, but I see markers that shows me hidden columns(xls) or empty cells with borders in pdf.
I started to “repair” Your’s php scripts, and I made “total” hiding when column width is 2 ( in excell generator’s)
Try to update files from attachment, please.
This files process hidden columns correctly and don’t output they.
grid2Excel.zip (5.08 KB)
I haven’t run Yours scripts, but I saw a code.
And I see that u hide only headers. When I did it, it wasn’t ok and I had to hide hidden columns from rows. But maybe i didn’t see something what correct this…
But I see that script wait for “hidden” atribute in xml, but my version of grid exports something like this
And there is no hidden atribute exporting for hidden columns.
my dhtmlsgrid.js version://v.2.6 build 100722
all package grid(from readme.txt): dhtmlxGrid v.2.6 Professional edition build 110318 (IE9 fix applied) EVALUATION VERSION!!!
And the same problem was with exportng PDF.
Sorry for the delay in answering.
Update dhtmlxgrid_export.js from attachment, please. It looks like your dhtmlxgrid_export.js file is old-fashioned.
dhtmlxgrid_export.zip (2.63 KB)