halil
November 6, 2023, 8:29pm
1
hi people,
i have a problem. i assigned a button to download datas as excel table. But i do not need all columns in that table (for instance there are 5 columns, i want to make it 3). After data when i add specific column names, i can download an excel table but it comes as empty.
columns downloadable).
Hi @kbn , @victoria , @Kabirdas , @joeBumbaca , @Tess ,
I have a similar kind of situation but I would like to include custom columns as well.
Hello,
The button has the event handler to export data. There you can map the data. In my case, I am exporting only emails and roles.
code example:
{{ table1.data.map(item => ({ email: item.email, role: item.role} ) ) }}
1 Like
halil
November 8, 2023, 2:20pm
4
Hi Rati,
many thanks for your answer, but it did not work in my case. i am sharing my solution, but it is kinda very long!
//========================================================================//=====
//example query ==== Example Table====
//========================================================================//=====
const columnAInstance= example.data.columnA;
const columnBInstance= example.data.columnB;
...
//===//
const transformedDataExample = Object.keys(columnA).map(key => {
return {
columnA: columnAInstance[key],
columnA: columnBInstance[key],
};
});
//===//
utils.exportDatatransformedDataExample, "Example", "xlsx");```
1 Like