tracker issue : CF-4042548

select a category, or use search below
(searches all categories and all time range)
Title:

Add support for protecting a sheet of .xlsx files

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Hiroki Taniura / Hiroki Taniura (Taniura Hiroki)

Created: 08/25/2015

Components: Document Management, Office Integration

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 1

Currently SpreadsheetWrite does not support protecting a sheet of .xlsx files.
https://wikidocs.adobe.com/wiki/display/coldfusionen/SpreadsheetWrite

It could be added to ColdFusion 11 because POI has been updated to 3.9 and POI 3.7 or later supports protecting sheets of .xlsx files.
Search for "48900" in the changelog below.
https://poi.apache.org/changes.html

Actually the code below can read Book.xlsx and output ProtectedBook.xlsx with a protected sheet.

<cfset f = createObject("java", "java.io.File").init("#ExpandPath('./Book.xlsx')#")>
<cfset myfile = createObject("java","java.io.FileInputStream").init(f)>

<cfset excelbook = createObject("java","org.apache.poi.xssf.usermodel.XSSFWorkbook")>
<cfset excelbook.init(myfile)>

<cfscript>
excelbook.setActiveSheet(0);
sheet = excelbook.getSheet("Sheet1");
sheet.protectsheet("password");
</cfscript>

<cfset objFileOutputStream = CreateObject("java","java.io.FileOutputStream").Init(JavaCast("string",ExpandPath( "./ProtectedBook.xlsx"))) />
<cfset excelbook.Write(objFileOutputStream) />
<cfset objFileOutputStream.Close() />


It would be nice if SpreadsheetWrite could do the same.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4042548

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Taniura
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Verified the above code. This is working. It protect a single sheet of a xlsx file. This a enhancement request where user is asking to add support for protecting a single sheet of xlsx file.Currently when I am trying to write a sheet using SpreadSheetRead to read a single worksheet, it saves all worksheets when writing.
Comment by Poonam J.
6142 | August 25, 2015 03:05:10 AM GMT
+1 ......................
Vote by External U.
6146 | September 08, 2015 01:33:00 AM GMT
Hi Piyush, Please verify if this has been fixed?As per Poonam's comment, seems like working. Thanks Mayur Jain
Comment by Mayur J.
6143 | October 27, 2015 12:58:11 AM GMT
Adding changes for the update flow in 296239 change list.
Comment by Mayur J.
6144 | November 02, 2015 05:36:06 AM GMT
Hi, I'm glad that it will be available in Raijin, but could you please add it to CF11 as well?
Comment by External U.
6145 | February 05, 2016 01:36:41 AM GMT