There is a database table where user can write into. I need to generate a dynamic template using the data from the table. Meaning I have a button or a link, whenever user click it, the latest template should be generated and downloaded.
2. And I want one of the column to be populated with a dropdown and user can only choose value from the dropdown, which also means the excel should be protected. Can we generate protected excel with only specified cells that can be edited
How can I implement this?
Discussion posts and replies are publicly visible
Try creating another similar table which will serve as a reference for the template. On the button or link use Export DSE to excel to create a empty document with headers. Since both the tables have similar structure, the created excel file can be used as a template to import to the main table
primaryTabe: Id | Col 1 | Col 2 | ... |Col n
primaryTabTemplate: Id | Col 1 | Col 2 | ... |Col n
Can we rename the headers for exported excel file in Export DSE to excel
I recommend using the documentToUpdate parameter of exportDataStoreEntityToExcel to create your own Excel formatting document with headers and supported Excel formatting.Create your Excel template and feed it to the smart service to update it, ensuring that all formatting remains intact. Remember to set includeHeader to false.
Thank you, it works! But I tried to uploaded an excel file with protected cells, the system can still write data into them and break the protection. How does system know the password?