Hello,
I am exporting a grid using: $.ig.GridExcelExporter.exportGrid(...);
Can I export the grid without style?
I only watch the options tableStyle and gridStyling, but i can't set none style.
Thanks you and kind regards.
Hi Sergio,
Actually your requirement is achievable right away using the current API. To have the data exported and no style applied you need to:
$.ig.GridExcelExporter.exportGrid($("#grid"), { gridStyling: "none" }, { headerCellExported: function (e, args) { args.xlRow.getCellFormat(args.columnIndex).formatOptions($.ig.excel.WorksheetCellFormatOptions.none); }, exportEnding: function (e, args) { args.worksheet.tables().removeAt(0, false); },});
Please see this jsfiddle and let mek now if you have other questions, I will be glad to help.
Hristo
Thanks Hristo, this answer is perfect.
One question more, Is it possible not fix the header?
Regards
What do you mean by fixing the header ? No column or row is fixed by default.
Thank you very much
By default the headers are frozen and you can unfreeze them in exportEnding with the following:
args.worksheet.displayOptions().panesAreFrozen(false);
Here is an updated jsfiddle showing this.
Yes, in your jsfiddle if you export, the first row (header) is fix in the excel.
I want not fix any row