tracker issue : CF-4051606

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

Error message missing when passing wrong data to spreadsheet.addRows()

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 09/08/2015

Components: Document Management, Office Integration

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 1

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on May 17, 2018 using build 2016.0.01.298513

spreadsheet = spreadsheetNew();
data = [
	["toru,wha"],	// this is one data value
	["rima,ono"] // so is this
filePath= expandPath("./withArray.xls");

spreadsheet.write(filePath, true);

I was guessing as to the syntax as the docs don't explain how to use an array with this function, so I naturally assumed it took an array (rows) of arrays (column data). I was wrong as it turns out, but the error message is missing any useful detail:

An exception occurred while calling the function addRows.

The error occurred in C:/apps/adobe/ColdFusion/11/express/cfusion/wwwroot/shared/cfml/language/functions/spreadsheet/spreadsheetAddRows/withArray.cfm: line 11
9 : filePath= expandPath("./withArray.xls");
10 : 
11 : spreadsheet.addRows(data,1,1);
12 : spreadsheet.write(filePath, true);
13 : </cfscript>

It needs to explain WHY I got the exception (just like any other CF error would)

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

Watson Bug ID:	4051606

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



+1 - the java.lang.NullPointerException isn't a helpful error message
Vote by External U.
5959 | September 08, 2015 05:24:59 PM GMT
@Piyush Please raise a separate bug for below scenario.
Comment by Mayur J.
5958 | September 24, 2015 11:49:12 PM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). No error is thrown. Resultant spreadsheet has 1st column populated: "tahi" "rua" "toru,wha" "rima,ono" Thanks!, -Aaron
Comment by Aaron N.
27848 | May 17, 2018 10:48:35 PM GMT