Closed lorin-monday closed 6 months ago
Hey @lorin-monday ... I am not 100% sure if this is possible. I guess your best shot at this is to use the web worker approach.
@cherniavskii do you know if we can support it like this?
@lorin-monday @michelengelen If I am not wrong we can use customisation of exceljsPostProcess to generate the password protected excel
code snipper which I think will work is
function exceljsPostProcess({ workbook }: { workbook: ExcelJS.Workbook }) {
// Get the first worksheet
const worksheet = workbook.getWorksheet(1);
// Set password protection for the worksheet
worksheet.protection = {
sheet: true,
password: 'your_password_here' // Replace 'your_password_here' with the desired password
};
}
Seems like the approach from @shaharyar-shamshi might just be what you are looking for @lorin-monday ... could you try that and let us know if that is a sufficient solution for your use case? Thanks! 🙇🏼
The issue has been inactive for 7 days and has been automatically closed.
The problem in depth
I would like to add password protection to the exported Excel files. Does your package offer any functions, methods, or options for password protection during the export process? If not, I would appreciate any suggestions or guidance on how I can achieve this feature with your package.
Additionally, I would like to set a specific name for the exported files, preferably using the account name. Is it possible to incorporate this functionality using your package? If so, could you please provide some instructions or suggestions on how to implement this?
Your environment
`npx @mui/envinfo`
``` @mui/envinfo@2.0.18 ```Search keywords: password excelfile Order ID: 59343