• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Protect Excel file?

Guest
Oct 25, 2007 Oct 25, 2007

Copy link to clipboard

Copied

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.

Thanks,
Ken
TOPICS
Advanced techniques

Views

315

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 26, 2007 Oct 26, 2007

Copy link to clipboard

Copied

LATEST
Hey Ken,

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.

Hope this helps.

- William

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation