tracker issue : CF-4195395

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

An exception occurred while using action=write. at coldfusion.excel.Excel.writeExcel Error when using cfspreadsheet tag.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Masha Edelen / Masha Edelen (Masha Edelen)

Created: 10/06/2016

Components: Document Management, Office Integration

Versions: 10.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / Some users will encounter

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

Vote Count: 0

Problem Description:
Unable to use cfspreadsheet tag after the update with the following code:

<cfspreadsheet action="write"
name="BuildExcel"
filename="#filePath#\#fileName#.xls"
overwrite="true"
sheetname = "Custom sheet name with a #Variable#">

Getting an error
An exception occurred while using action=write. java.lang.NullPointerException 

Steps to Reproduce:
<cfspreadsheet action="write"
name="BuildExcel"
filename="#filePath#\#fileName#.xls"
overwrite="true"
sheetname = "Custom sheet name with a #Variable#">

Actual Result:
Error

Expected Result:
Writing spreadsheet. 

Any Workarounds:
Removing the sheetname solves the problem.

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

Watson Bug ID:	4195395

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

Windows 2008, CF10, Update 21

Attachments:

Comments:

Seems to only happen with attribute "name" not "query".
Comment by External U.
1680 | October 06, 2016 08:28:45 AM GMT
Masha, I am unable to observe any exception with the test code at the end of this note, with CF 10,0,21,300068. Can you pls. share a working code snippet, along with the exception stack trace generated by that code (you can find the stack trace in the <cf_root>/cfusion/logs/exception.log file) Test code: <cfscript> q1 = queryNew("col1, col2", "Integer,Varchar", {col1=1, col2="uno"}); q2 = queryNew("col1, col2", "Integer,Varchar", {col1=2, col2="dos"}); q3 = queryNew("col1, col2", "Integer,Varchar", {col1=3, col2="tres"}); sh_name = "excel-sheet"; updated_sh_name = "updated #sh_name#"; fileName = expandPath("./out-data.xls"); </cfscript> <cfset xl_obj = spreadSheetNew(sh_name)> <cfset spreadsheetAddRows(xl_obj, q1)> <cfspreadsheet action="write" query="q1" filename="#fileName#" overwrite=true sheetname="#sh_name#"> <cfset spreadsheetAddRows(xl_obj, q2)> <cfspreadsheet action="update" name="xl_obj" filename="#fileName#" sheetname="#updated_sh_name#"> <cfspreadsheet action="write" filename="#expandPath('./out-data2.xls')#" name="xl_obj" overwrite=true sheetname="#updated_sh_name#"> <cfspreadsheet action="read" src="#expandPath('./out-data2.xls')#" query="read_q" sheetname="#updated_sh_name#"> <cfdump var=#read_q#>
Comment by Piyush K.
1681 | October 18, 2016 07:04:28 AM GMT
Masha, I'm closing this as I am not able to observe the issue. In case you get back with the information requested in my previous comment, we can reopen this.
Comment by Piyush K.
1682 | November 04, 2016 04:58:47 AM GMT