Hi there,
Right now I am trying to change on how the excel export works for the datagrid. Since I have several fields with links and booleans I don't want to show I would like to filter out those columns on the export (or be able to make a different export action that excludes these columns).
From what I see from Wijmo, there should be something like that here https://www.grapecity.com/wijmo/api/interfaces/wijmo_grid_xlsx.iflexgridxlsxoptions.html#includecolumns
I tried multiple times to set a function for this, like this
wijmo.grid.xlsx.FlexGridXlsxConverter.save($parameters.GridObject, { includeColumns: function(column) { return (column.binding !== 'DatagridRow.test');}},'test.xlsx');
Every time I try to do this I get this error: "Cannot read properties of undefined (reading 'appendChild')".From what I see, this happens because the main object for the grid is missing the appendChild.
Did anyone had this issue and managed to get a solution for this?Thanks in advance for any help provided.
Hi there Gonçalo,
Thanks for pointing out in the right direction. I have to say, I would expect this to be available as is on the datagrid, I can imagine this is not such a weird use case.But anyways, I will leave here a detailed answer for this issue:
In case there are other options from Wijmo that could eventually correlate to these options, probably this is a good way to do it.
hi Jorge Vicente Canhoto da Silva,
This is working for exporting datagrid into excel. Can we use the same js code for the exporting datagrid To CSV also?
if yes, can you provide the modified js code for exporting the datagrid to CSV also?
Hello Jorge,
Could you share the OML with the use case and issue you're mentioning?Since this is a very customizable use case, maybe you can that a look at the approach I mentioned here (not the same use case but is to manipulate the data on the Excel export so you could explore the object configs)
Cheers,GM