Creating Excel Files With ColdFusion, XML, And POI

<!---
	Create the ColdFusion XML object that will be used
	to create a Microsoft Excel document using ColdFusion
	and the POI library.
--->
<cfxml variable="xmlData">
 
	<workbook>
 
		<!--- Define the global CSS classes. --->
		<classes>
 
			<!--- Global TD-Cell style. --->
			<class
				name="cell"
				value="font: 12pt arial ;"
				/>
 
			<!--- Additional CSS styles. --->
			<class
				name="header"
				value="border-bottom: 2px solid black ; font-weight: bold ;"
				/>
 
			<class
				name="row"
				value="border-bottom: 1px dotted gray ;"
				/>
 
		</classes>
 
		<!--- Define the sheets. --->
		<sheets>
 
			<sheet>
 
				<name>Hot Actresses!</name>
 
				<!--- Define the rows. --->
				<rows>
 
					<row class="header">
						<cell>
							Name
						</cell>
						<cell>
							Hair Color
						</cell>
						<cell>
							Hotness
						</cell>
					</row>
 
					<row class="row">
						<cell>
							Christina Cox
						</cell>
						<cell>
							Dirty Blonde
						</cell>
						<cell type="numeric" format="0.0">
							9.0
						</cell>
					</row>
 
					<row class="row">
						<cell>
							Maura Tierney
						</cell>
						<cell>
							Brunette
						</cell>
						<cell type="numeric" format="0.0">
							8.0
						</cell>
					</row>
 
					<row class="row">
						<cell>
							Maria Bello
						</cell>
						<cell>
							Brunette
						</cell>
						<cell type="numeric" format="0.0">
							9.5
						</cell>
					</row>
 
				</rows>
 
			</sheet>
 
		</sheets>
 
	</workbook>
 
</cfxml>

For Cut-and-Paste