Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrisdpeters opened this issue Jul 25, 2016 · 3 comments

Comments

@chrisdpeters
Copy link

chrisdpeters commented Jul 25, 2016

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. 😕)

@Leftbower
Copy link
Owner

It appears that when Lucee creates the .lar file, it does so with an absolute path to the archive folder, rather than a relative one? I will need to investigate. There is very little in the way of documentation on creating/maintaining these files. Using the archive was the only way to get around Lucee's current inability to deploy a component into the component directory.

@chrisdpeters
Copy link
Author

@Leftbower I hear you on the lack of documentation. That's why I've been relatively useless in helping out.

We may take a stab at fixing the actual error described in this issue, but I don't think it's a priority at this time.

@Leftbower
Copy link
Owner

Looking at the Spreadsheet.cfc source code, under the write function, the boolean argument overwrite="true" does not appear to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants