
892
DEVELOPING
COLDFUSION 9 APPLICATIONS
Office file interoperability
Las
t
upda
te
d 8/5/2010
<cfpresentation
title="my presentation"
directory="C:\presentations"
overwrite=true>
<cfpresentationslide
src="#ppttemplate#backgrounds.ppt"
slides="1-3,5">
</cfpresentationslide>
<cfpresentationslide
duration="4"
video="video1.flv">
Sample slide
</cfpresentationslide>
</cfpresentation>
Using cfspreadsheet
The
cfspreadsheet
tag lets you manage Excel spreadsheets. The tag lets you do the following:
•
Read a spreadsheet file (XLS file) and store it in a ColdFusion spreadsheet object, query, CSV string, or HTML
string.
•
Write a single sheet to a new XLS from a query, ColdFusion spreadsheet object, or CSV string variable.
•
Add a sheet to an existing XLS file.
Use the spreadsheet functions to manipulate rows and columns in a spreadsheet and the data in the rows and columns.
You can also specify and get comments, values, and formulas for a cell in the spreadsheet.
Microsoft Office Excel 2007 is supported by
cfspreadsheet
and all the spreadsheet functions except the following:
•
SpreadSheetAddSplitPane
•
SpreadSheetAddFreezePane
For detailed information about
cfspreadsheet
and all the spreadsheet functions, see
CFML Reference
.
Examples
The following example reads the spreadsheet file - SingleSheet.xls and stores the spreadsheet data in a CSV string.
<cfspreadsheet action = "read"
format="csv"
src="C:\documents\SingleSheet.xls"
name="csvvar"
rows="1-4,5,6,7-8">
<cfoutput>#csvvar#</cfoutput>
The following example reads the spreadsheet file - template_02.xls and stores the spreadsheet data in a query.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...