Shapediver email export, password

Hi,
How I can add password protection in excel output in shapediver?

I have attached GH for review

TEST.gh (6.0 KB)

Can you please give some context and describe the user experience you want to create? Do you want to ask users for a password when they click on the “Download” button in the configurator? Or add a password protection to the file itself, prompted by Excel when they open the file?

Hi @mathieu1
add a password protection to file itself, prompted by Excel they open the file.

The file you included in your message is using the csv export, which does not support password protection.

There is a solution to your problem which involves a little more work. You can use a script to programmatically create an Excel file and the Stream Export Options to export to .xlsl. Here is an example importing and exporting native Excel files using this method:

240912_ExcelIO.gh (18.1 KB)

You can likely adapt the script building the Excel file using the NPOI library to include a password protection option when creating it.

The example I posted above does everything except the password protection step.

There are resources online about how to protect Excel files programmatically: https://blog.aspose.com/cells/protect-or-unprotect-excel-files-using-csharp/