tracker issue : CF-4205366

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

SpreadsheetAddRows throws java.lang.ArrayStoreException when 2d array contains mixed value types

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): N T. / ()

Created: 10/03/2019

Components: Document Management, Office Integration

Versions: 2018

Failure Type:

Found In Build/Fixed In Build: 2018,0,05,315699 /

Priority/Frequency: Normal /

Locale/System: / Windows 7 64-bit

Vote Count: 0

Problem Description:
SpreadsheetAddRows fails when used with a 2D array containing a mix of strings and numbers

Steps to Reproduce:
<cfscript>
    // Tested on:  2018,0,05,315699
    WriteDump( "Version: "& server.coldfusion.productVersion );
        
  	sheet = SpreadsheetNew("Data", true); 

	// succeeds
   	data = [["aa","bb"]]; 
   	spreadsheetAddRows( sheet, data, 1, 1);
	
    // fails
   	data = [["aa",22]]; 
   	spreadsheetAddRows( sheet, data, 2, 1);
</cfscript>
	
Actual Result:
Error occurs:
java.lang.ArrayStoreException at java.util.ArrayList.toArray(ArrayList.java:412) at coldfusion.runtime.CFPage.SpreadsheetAddRows(CFPage.java:11406)

Expected Result:
Code should complete successfully.

Any Workarounds:

Attachments:

Comments: