Is there a way to protect an Excel workbook created using
CFCONTENT so the user can't unprotect it?
I can protect the workbook using XML - but the user can just
remove the protection. APparently you can't add password protection
using XML (if you protect a workbook with a password Excel doesn't
let you save as XML).
I'm guessing this isn't possible but I told my manager I'd
try to find out.
I don't know exactly the top of my head and I don't have time
to check at the moment, but to find out if it's possible there are
two places to look. The first is the MS Excel COM object, which
ColdFusion can interface with through the <cfcomponent> tag.
I would instantiate an Excel COM object and look at the method
listing (just <cfdump> the variable) and see if anything
looks promising. That is the most likely candidate.
Failing that, I would check out the Apache POI HSSF spec to
see if they make any methods available to do it. POI is included
with ColdFusion MX, so it's there to use if you need it. I consider
it unlikely they have a method for it, but if you look in both
places and can't find anything, then I would feel comfortable
saying to your manager that it's not possible.