Thanks samjudson,
looking at your reply i realise i have not explained my function in enough detail.
I am currently using a classic asp page to export SQL data to excel using -
Code:
filename = Date() & "-Results.xls"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename="&filename&""
After investigating some simple XML examples i have been able to protect the worksheets within the <x:WorksheetOptions> tags using
Code:
<x:ProtectContents>True</x:ProtectContents>
<x:ProtectObjects>True</x:ProtectObjects>
<x:ProtectScenarios>True</x:ProtectScenarios>
What i am trying to get clarification of is if within XML you can set the password for the excel workbook.
If you feel this forum post is still more suited to the Excel forums please let me know.
Thanks
Aspless