Menu
![](/uploads/1/2/7/5/127597334/522084740.png)
I'm having the same issue - exporting w/ cfcontent with the intention of importing using a java api, however because the cscontent tag saves it with a file type of HTML the api looks at it as an invalid file type until the user opens the file and selects the excel file type and then resaves. Dec 15, 2006 Creating And Streaming Simple Microsoft Excel Files With ColdFusion By Ben Nadel on December 15, 2006. Creating And Streaming Simple Microsoft Excel Files With ColdFusion Woot woot — you rock the party that rocks the body! Export your example excel file and look for the XML data, that's all you need.
Function | Description |
SpreadSheetAddAutofilter | Adds auto filters to a spreadsheet. |
SpreadsheetAddColumn | Adds columns to a spreadsheet object. |
SpreadsheetAddFreezePane | Adds freeze pane to a spreadsheet. |
SpreadsheetAddImage | Adds an image to a spreadsheet object. |
SpreadsheetAddInfo | Adds information to an Excel spreadsheet object. |
SpreadSheetAddPagebreaks | Adds page breaks for rows and columns to a Spreadsheet object. |
SpreadsheetAddRow | Adds a row to an Excel spreadsheet object. |
SpreadsheetAddRows | Adds multiple rows from a query to an Excel spreadsheet object. |
SpreadsheetAddSplitPane | Adds split pane to a spreadsheet. |
SpreadsheetCreateSheet | Creates a spreadsheet object. |
SpreadsheetDeleteColumn | Deletes a column in a spreadsheet. |
SpreadsheetDeleteColumns | Deletes multiple columns in a spreadsheet. |
SpreadsheetDeleteRow | Deletes a row data in a spreadsheet object. It does not delete the row. |
SpreadsheetDeleteRows | Deletes all data from multiple rows of an Excel spreadsheet object. It does not delete the rows. |
SpreadsheetFormatCell | Formats the contents of a single cell of an Excel spreadsheet object. |
SpreadsheetFormatCellRange | Formats the contents of a cell range of an Excel spreadsheet object. |
SpreadsheetFormatColumn | Formats the contents of a single column of an Excel spreadsheet object. |
SpreadsheetFormatColumns | Formats the contents of a column range of an Excel spreadsheet object. |
SpreadsheetFormatRow | Formats the contents of a single row of an Excel spreadsheet object. |
SpreadsheetFormatRows | Formats the contents of multiple rows of an Excel spreadsheet object. |
SpreadsheetGetCellComment | Gets the comment for an Excel spreadsheet object cell as a structure with formatting information or all comments for the object. |
SpreadsheetGetCellFormula | Gets the formula for a for an Excel spreadsheet object |
SpreadsheetGetCellValue | Gets the value for a for an Excel spreadsheet object cell. |
SpreadsheetGetColumnCount | Gets the number of columns in a worksheet. |
SpreadsheetInfo | Returns the properties of a spreadsheet object. |
SpreadsheetMergeCells | Merges a rectangular block of two or more Excel spreadsheet object cells. |
SpreadsheetNew | Creates a ColdFusion spreadsheet object. |
SpreadsheetRead | Reads a sheet from a spreadsheet file and stores it in a ColdFusion spreadsheet object. |
SpreadsheetReadBinary | Reads a spreadsheet file into a binary object. |
SpreadsheetRemoveSheet | Deletes a spreadsheet. |
SpreadsheetSetActiveSheet | Sets a sheet in a spreadsheet as active. |
SpreadsheetSetActiveSheetNumber | Sets a sheet number in a spreadsheet as active. |
SpreadsheetSetCellComment | Sets the comment for an Excel spreadsheet object cell. |
SpreadsheetSetCellFormula | Specifies the formula for an Excel spreadsheet object cell. |
SpreadsheetSetCellValue | Specifies the value of an Excel spreadsheet object cell. |
SpreadsheetSetColumnWidth | Sets the width of a column in a spreadsheet object. |
SpreadsheetSetFooter | Sets the footer in a spreadsheet object. |
SpreadsheetSetHeader | Sets the header in a spreadsheet object. |
SpreadsheetSetRowHeight | Sets the height of a row in a spreadsheet object. |
SpreadsheetShiftColumns | Shifts one or multiple columns to the left or right in a spreadsheet object. |
SpreadsheetShiftRows | Shifts one or multiple rows up or down in a spreadsheet object. |
SpreadsheetWrite | Writes a spreadsheet object into a file. |
Twitter™ and Facebook posts are not covered under the terms of Creative Commons.
Legal Notices | Online Privacy Policy
If you are working on CF 9, first use cfspreadsheet tag to write to an excel sheet and then use the same tag to update the created excel sheet.Then use the same tag to UPDATE the excel sheet. If you are using CF 9, here is a simple function that you can use.It takes 3 arguments, query, sheetname and a flag(0,1), 1 stand that you are updating the excel sheet and 0 means you are creating a new one.Call this function first using flag as 0, so that it creates a new excel sheet, then call it again with flag as 1 so that it updates the excel sheet, I have just written it very quickly, it can be enhanced.
![Export Export](/uploads/1/2/7/5/127597334/523655466.png)
But should give you the idea Select all. Read more about the URN here -Gives correct results excel 2003, remeber.xlsx is OPEN XML formatTest Data 1Test Data 2. I loaded this codeTest Data 1Test Data 2And got the attached.xls openeind it up in excel 2010 and just one tabSame with Excel 2000 on another machine. Well it's preventing excel from interpreting the file. You have to get rid of it.
That's probably why the example works fine for us, but not for you.If that stuff's coming from an Application.cfm/cfc file either remove it OR move your test code to another directory that's not processed by your Application.cfm/cfcie Original location/mainApp/testArea/Applicat ion.cfc.
![](/uploads/1/2/7/5/127597334/522084740.png)