Skip to content

<cfspreadsheet action="write" overwrite="true"> not working with sheetname attribute #4

@chrisdpeters

Description

@chrisdpeters

Running Lucee 5.0.0.252 on Linux.

When calling an overwrite action on a specific sheet like so:

<!--- Slightly contrived example :) --->
<cfspreadsheet
  action="write"
  filename="/path/to/sheet.xls"
  name="spreadsheet"
  sheetname="xyz"
  overwrite="true"
>

I get the following error. It appears that the write action is ignoring overwrite="true" when attempting to update a sheet by name.

Lucee 5.0.0.252 Error (org.cfpoi.spreadsheet.Spreadsheet)
Message     Invalid Sheet Name
Detail  The workbook already contains a sheet named [02].
Stacktrace  The Error Occurred in
C:\dev\lucee\WEB-INF\lucee-server\context\components\org\cfpoi\spreadsheet\Spreadsheet.cfc: line 193
called from /opt/lucee/server/lucee-server/context/library/tag/spreadsheet.cfc: line 174
...

(I also find it somewhat strange that it's showing a Windows-style path in the stacktrace when I'm running this on Linux. 😕)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions