tracker issue : CF-3925916

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

cfspreadsheet unable to write to ram://

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): George Alsobrooks / George Alsobrooks (GEORGE ALSOBROOKS)

Created: 01/22/2015

Components: File Management, VFS-RAM

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 1

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on February 16, 2019 using build 2016.0.01.298513
Problem Description:  cfspreadsheet tag is unable to write to the Virtual File System by using "ram://"

This was reportedly fixed in CF 10 Update 11, and previously reported in these Bugs:
3178676 "cfspreadsheet with ram://"
3042909 "Cannot use action="write" with the cfspreadsheet tag and a filename on the VFS "

Steps to Reproduce:
<cfoutput>
	<br><br>Write text file to disk
	<cffile action="write" file="#expandPath('./cfspreadsheet.txt')#" output="Quick Test">

	<br><br>Write text file to ram
	<cffile action="write" file="ram://cfspreadsheet.txt" output="Quick Test">

	<br><br>Read text file from ram
	<cffile action="read" file="ram://cfspreadsheet.txt" variable="ReadInfo">

	<br><br>We read in: #ReadInfo#
	
	<cfset qtest = QueryNew('A,B,C')>
	<br><br>Write excel file to disk	
	<cfspreadsheet action="write" filename="#expandPath('./cfspreadsheet.xls')#"query="qtest" overwrite="true"> 
	<br><br>Write excel file to ram
	<cfspreadsheet action="write" filename="ram://cfspreadsheet.xls" query="qtest" overwrite="true"> 
	<!--- The above line throws an error --->
</cfoutput>

Actual Result:  The following error message is displayed:
An exception occurred while using action=write.  
java.io.FileNotFoundException: ram:///cfspreadsheet.xls  


Expected Result:  cfspreadsheet should write the excel file to ram and not throw an error.

Any Workarounds:  Write to Disk instead of ram.

Other:
In the example above I write to and read from ram using cffile just to verify that ram:// is available.  All of the code above worked except for the last line trying to cfspreadsheet to ram://.

I don't have the ability to remove updates from the ColdFusion server so I have no way to test which update broke this functionality, or if it was still broke after Update 11.  I'm only now trying to use this to help with the god awful slowness of the spreadsheet functions in ColdFusion.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3925916

External Customer Info:
External Company:  
External Customer Name: GEORGE
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 2008R2 64 Bit Server

Coldfusion 10 with Update 15.

Attachments:

Comments:

Verified #CF-3042909 and #CF-3178676 were only fixed for cfspreadsheet's name="" attribute, but not fixed for its query="" attribute. Verified in CF10 Update 15, CF11 Final, CF11 Update 3 and CF11 Update 4. This runs fine: <cfset mySheet = spreadsheetNew()> <cfspreadsheet action="write" filename="ram:///spreadsheet_from_sheet.xlsx" name="mySheet" overwrite="true"> <cfspreadsheet action="read" src="ram:///spreadsheet_from_sheet.xlsx" name="mySheetFromSheet"> <cfdump var="#mySheetFromSheet#"> This fails: <cfset myQuery = queryNew("myColumn", "varchar", [["foo"],["bar"]])> <cfspreadsheet action="write" filename="ram:///spreadsheet_from_query.xlsx" query="myQuery" overwrite="true"> <cfspreadsheet action="read" src="ram:///spreadsheet_from_query.xlsx" name="mySheetFromQuery"> <cfdump var="#mySheetFromQuery#"> Thanks!, -Aaron
Comment by External U.
8853 | January 29, 2015 03:53:16 AM GMT
+1 - #CF-3042909 and #CF-3178676 were not fully fixed
Vote by External U.
8864 | January 29, 2015 03:54:00 AM GMT
When this ticket is fixed, could this test please be updated to include testing the query="" attribute? \depot\ColdFusion\qa\cf\regression\coretests\coldfusion\tags\extensibility\msoffice\poi_v39\Bugs\bug7_CF-3042909 Thanks!, -Aaron
Comment by External U.
8854 | January 29, 2015 03:57:07 AM GMT
*bump*
Comment by External U.
8855 | September 05, 2015 01:50:33 AM GMT
I see this is now marked Closed/Fixed. I don't see an answer to my question. Was query attribute also fixed? Meaning, does the following run fine now? <cfset myQuery = queryNew("myColumn", "varchar", [["foo"],["bar"]])> <cfspreadsheet action="write" filename="ram:///spreadsheet_from_query.xlsx" query="myQuery" overwrite="true"> <cfspreadsheet action="read" src="ram:///spreadsheet_from_query.xlsx" name="mySheetFromQuery"> <cfdump var="#mySheetFromQuery#"> Thanks!, -Aaron
Comment by External U.
8856 | September 21, 2015 09:17:44 AM GMT
Yes Aaron it works fine now !
Comment by Suchika S.
8857 | September 21, 2015 09:22:56 AM GMT
Two questions: 1) Will this be fixed in an upcoming CF10 update? (since this ticket was filed for CF10) 2) Was this fixed for the query attribute also? (or only for the name attribute?)
Comment by External U.
8858 | September 22, 2015 11:37:06 AM GMT
*bump*! This ticket was fixed for cfspreadsheet's name="" attribute, but not fixed for its query="" attribute. Did you ever fix this issue for the query="' attribute? Why do I have to keep asking? Thanks!, -Aaron
Comment by External U.
8859 | October 28, 2015 04:01:29 PM GMT
Please verify w/ the code in my 1:23:16 AM GMT+00:00 Jan 29, 2015 that failed w/ the query="" attribute.
Comment by External U.
8860 | October 28, 2015 04:02:25 PM GMT
Please verify w/ the code in my 1:23:16 AM GMT+00:00 Jan 29, 2015 comment that failed w/ the query="" attribute.
Comment by External U.
8861 | October 28, 2015 04:02:45 PM GMT
Hi Aaron , We forgot to make the previous note external. Extremely sorry! It works now for both name & query attribute. The fix would be available for the next major version of ColdFusion. Thanks, Suchika.
Comment by Suchika S.
8862 | October 29, 2015 12:14:06 AM GMT
Hi Suchika, Awesome and no worries. Thank you very much for confirming! -Aaron
Comment by External U.
8863 | October 29, 2015 12:19:46 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
30275 | February 16, 2019 05:12:45 AM GMT