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

Already on GitHub? Sign in to your account

XLSX files cannot be deleted after using cfspreadsheet action="read" #32

Closed
Leigh- opened this Issue Nov 26, 2011 · 0 comments

Comments

Projects
None yet
1 participant

Leigh- commented Nov 26, 2011

Reading an ooxml spreadsheet into a query|html|csv formats sometimes leaves file in a locked state so the cannot be deleted.

Code:

<cfset outPath = "c:/railoTest.xlsx" />
<cfset sheet = spreadsheetNew("SheetA", true) />
<cfset spreadsheetAddRow(sheet, "foo,bar") />
<cfset SpreadSheetWrite(sheet, outPath, true) />
<cfspreadsheet action="read" src="#outPath#" format="html" name="result" />
<cfset FileDelete(outPath) />

Error

Message can't delete file c:\railoTest.xlsx 
Cause java.io.IOException 

@Leigh- Leigh- closed this in f5cee94 Nov 28, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment