Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Protect spreadsheet with cfspreadsheet

$
0
0

I am trying to create a locked version of spreadsheet before letting users download it. The password function for cfspreadsheet does not seem to work. the basic operation is this: I read an existing spreadsheet, and then I write it to a new file using the password option. But the file is not protected. I have looked at cfspreadsheet password, but that is not giving me any insight to the issue. I have also tried to use spreadsheetfomatcellrange function to lock all of the cells in the sheet, but that didn't work either.

 

On a secondary note, I am seeing some behavior that I wasn't expecting. The Excel file that I am trying to recreate has 3 sheets. When I read the file, I am getting all three sheets and not just the first one. Then when I write the sheet, I am getting all three sheets in the new file. I was expecting to have to read each sheet individually then then write them individually as well.

 

<cfset xfile = '#application.doc_directory_file#' & '#URL.fname#'>

<cfset new_file = '#application.doc_directory_file#'  & 'locked' & '#URL.fname#'>

<cfspreadsheet action="read" src = "#xfile#" sheet="1" name="pilot_sheet">

<cfspreadsheet action="write" filename="#new_file#" sheetname="Pilot Instructions" name="pilot_sheet" password="pwd" overwrite="true">

 

Any help would be much appreciated.

 

Thanks

 

DW


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>