Hi,
I would like to ask how can we apporach to acheive our customr reqest to mask data when exporitng data to CSV, Excel.
So in Flexmonster grid we have folowing data for example:
ID FirstName LastName Registration
1 Joško Blažič 1.1.2023
2 Marko Kržič 1.2.2023
Desired CSV, Excel output. Each field have propery that it should or not to be masked.
ID FirstName LastName Registration
1 **** **** 1.1.2023
2 **** **** 1.2.2023
Thnk you
Janez
Hello, Janez!
Thank you for your question.
The following functionality can be achieved by customizing the export via the exportTo()
API call. By setting the destination: "plain"
property in the export options, the exported Excel will be returned to the callback handler function as the Uint8Array
object. In the callback handler, you can process the exported Excel to mask certain cells' data. This can be done with third-party libraries for working with Excel spreadsheets like SheetJS or ExcelJS:
pivot.exportTo("excel", { destination: "plain" },
function (res) {
let excelData = res.data;
//Your export handler here
}
);
In case you would like to make this functionality accessible from the Toolbar's export tab, you can replace the export handler through the toolbar customization.
Please let us know if the suggested approach works for you.
Best Regards,
Maksym
Hello, Janez!
Hope you are doing well.
We are wondering if you were able to implement the solution for masking columns on export.
Looking forward to hearing your feedback.
Best Regards,
Maksym
Hello, Janez!
Just checking in to ask if you tried implementing the custom export functionality.
Please let us know if the suggested approach works for you.
Best Regards,
Maksym
Thank you for your response. We tired in this direction but the cutomre chaged the specification and we don't need this functionality for now.
You can close this case for now.
Hello, Janez!
Thank you for your reply.
Feel free to contact us if more questions arise.
Best Regards,
Maksym