tracker issue : CF-4205357

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

SpreadSheetRead() Does Not Read Past First Page

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/UserError

Reporter/Name(from Bugbase): Ray G. / ()

Created: 10/02/2019

Components: Document Management, Office Integration

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018,0,01,314546 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2016

Vote Count: 0

Problem Description:
Function spreadSheetRead() and tag CFSpreadsheet with "read" action attribute

Steps to Reproduce:
local.returnObject = spreadSheetRead(test.cfm, "2");

Actual Result:
coldfusion.excel.Excel$ExcelInvalidSheetNameException: Specified sheet 2 is not valid. at coldfusion.excel.Excel.getExcelInfo( at coldfusion.excel.Excel.getExcelInfo( at coldfusion.runtime.CFPage.SpreadsheetRead( 

Expected Result:
Spreadsheet Object

Any Workarounds:
Use only value 1 for attribute sheetNumber and modify logic as necessary



Ray, In the test snippet you've shared, you're passing a cfm file as the first argument. It takes a spreadsheet file. Ref. the documentation at Can you share the complete working code. I was unable to replicate the issue with CF2018,0,05,315699. Here's the test code I used: <cfscript> writeoutput(server.coldfusion.productversion & "<hr><hr>") ; uExcelName= expandpath('./testoutput.xlsx'); qData = queryNew("id,name,amount","Integer,Varchar,Integer", [ {id=1,name="One",amount=15}, {id=2,name="Two",amount=18}, {id=3,name="Three",amount=32} ]); aQuery=ArrayNew(1); for (idx=1; idx <= 20;idx=idx+1) { ArrayAppend(aQuery,["test",idx,idx]); } </cfscript> <cfspreadsheet action="write" filename="#Variables.uExcelName#" name="theSheet" sheet="1" overwrite="true"> <cfspreadsheet action="update" filename="#Variables.uExcelName#" query="qData" sheet="2"> <cfscript> local.returnObject = spreadSheetRead(uExcelName, "2"); writeDump(local.returnObject); </cfscript>
Comment by Piyush K.
31636 | October 17, 2019 01:55:48 PM GMT
Ray, I am closing this.. from the example you shared, it looks like you not not passing the parameters correctly. pls. refer my previous comment for details. If you feel otherwise pls. feel free to revert.
Comment by Piyush K.
31726 | November 06, 2019 01:37:53 PM GMT