teamcfadvance / cfspreadsheet-railo

My Railo Extension provider including CFPOI (<cfspreadsheet>)
24 stars 16 forks source link

SpreadsheetGetCellComment fails with an undefined variable error #14

Closed Leigh- closed 13 years ago

Leigh- commented 13 years ago

Bug/Request This function (and a few others) sometimes fail with undefined or null errors when trying to access methods on a null POI object. Depending on the function, the nulls should either be ignored (such as with cell values) OR they should be handled with a more user friendly error.

Code

<cfset newComment = { author="Me", comment="Values and formulas and comments oh my", color="Blue" } />
<cfset SpreadSheetAddRow( sheet, "foo,bar" ) />
<cfset comments = SpreadsheetGetCellComment( sheet ) />

Error Railo 3.2.1.000 Error (expression) Message variable [COMMENT] doesn't exist Stacktrace The Error Occurred in C:\dev\railoExpressClean\webroot\WEB-INF\railo\components\org\cfpoi\spreadsheet\Spreadsheet.cfc: line 1258

1256: <cfset comment = cellIterator.next().getCellComment() />
1257: 
1258: <cfif comment neq "">
1259: <cfset theComment = StructNew() />
1260: <cfset theComment.author = comment.getAuthor() />
Leigh- commented 13 years ago

I think CellValue and CellFormula should ignore the nulls and just return an empty string. Not sure how *CellComment should behave. It normally returns a structure or an array ...

Leigh- commented 13 years ago

Closed by commit: andyj/RailoExtensionProvider@884b087d7e31be921a64