 Using Jakarta POI, CFX_Excel can be used in any platform that supports ColdFusion MX. It uses Java, so no MS Excel nor COM necessary. The read operation will transform Excel file into ColdFusion query. While the write operation will transform ColdFusion query to Excel file.
New in v3:
- Full unicode characters support. Many thanks goes to our customers from Japan, China and France for requesting this feature.
- Ability to set number of decimals converted to CF query. Using the new "DecimalDigit" attribute, you can now specifically tells how many decimal digit should CFX_Excel read from the Excel file
- Merged cells support. By popular demands, merged cells can now be processed as if the all merged cells contain the same value in the CF query
New in v2.0:
- PreserveStyle attribute for writing Excel file. Keep the template cell style's for newly inserted rows
- Sample for template usage is now provided
- Better support for large records. Microsoft Excel has style limitation as advised by Microsoft: http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;213904
In V2, CFX_Excel will minimize the number of style to conform Microsoft Excel limit.
- Many thanks goes to Lidia Galluzzo from Cingular Wireless, and Irvin Gomez from Pixel69 for notifying us about this issue. CFX_Excel v2 is now safe for writing thousand of records.
- Better support for reading styled Excel files. Many thanks goes to Audie Roldan from Tranax for testing CFX_Excel styled document capabilty.
Features
- Fast operation
- Ability to read Microsoft Excel files and transform the content to ColdFusion query
- Ability to write ColdFusion query to Microsoft Excel files
- Support for template. Use template as a based for writing Excel file. Template may contains Excel objects, such as image, chart. Great for creating report with your company logo on it.
No need to programmatically set individual header, footer, font style, borders, print areas and others! Just set them in the Excel file, feed them as a template to this tag, and it's done! Try our new template sample to see what we mean.
- Support for Excel formulas. Formula can be read and write as string, or process the result.
- Support for multiple sheets, of course
- Works using Jakarta Java POI. No Microsoft Excel or any other COM object needed in the server.
Supported ColdFusion Server:
- ColdFusion MX 6, 6.1
- ColdFusion MX 7
on all operating systems, with Java support
Usage
To convert Microsoft Excel file into ColdFusion query (read operation):
| <cfx_excel |
action="read" |
| |
File="Full path and name of XLS input file, required" |
| |
Sheet="Sheet name or index number, optional default=Sheet1" |
| |
Result="output query name, required" |
| |
Formula="[process/show], optional default='process'" DecimalDigit="Number of decimal digits outputted to CF query. Default is 255 which will extract every single digit" ProcessMerged="true|false. True means every merged cells in Excel file will have one same value each in the resulting query. Default is false (v2 behaviour)" |
| |
HeaderStyle="[A/ZA/1/01], optional default='A'" |
| |
HeaderRow="Row to be treated as Column Header, optional" |
| |
StartRow="start of row to return, default =1" |
| |
EndRow="end of row to return, default = 0" |
| |
StartCol="start of Col number, default=A" |
| |
EndCol="end of col number, default=0"> |
Explanation: 1. Formula="show" means the resulting query will contain the original formula (as string). Formula="process" means the resulting query will contain the result of each formula found in the XLS file. 2. Header style is the Query Fields numbering scheme: A = A,B,C,D,...,AA,AB,AC,.. ZA= A,B,C,D,...,ZAA,ZAB,ZAC,... 1= COL_1,COL_2,... 01= COL_001,COL_002,... 3. HeaderRow if specified (or not equal to 0) will override the HeaderStyle 4. EndCol=0 means CFX_Excel will convert all non-empty (or has been edited) columns. 5. EndRow=0 means CFX_Excel will convert all non-empty (or has been edited) row.
To convert ColdFusion query into Microsoft Excel file (write operation):
| <cfx_excel |
action="write" |
| |
File="full path and name of XLS output file, required" |
| |
Template="Full path and name of XLS template file, optional" |
| |
Query="CF input query, required" |
| |
Sheet="Sheet name or index number, optional default=Sheet1" |
| |
Formula="[process/show], optional default='process'" |
| |
HeaderRow="Row to be treated as Column Header, optional" |
| |
StartRow="start of row to return, default =1" |
| |
StartCol="start of Col number, default=A" |
| |
ColumnList="list of columns to write, must match the query field name to write,optional" |
| |
InsertRow="[yes/no], optional. Default=yes" PreserveStyle="[yes/no], optional. Default=yes"> |
Explanation: 1. Formula="show" means the resulting query will contain the original formula (as string). Formula="process" means the resulting query will contain the result of each formula found in the XLS file. 2. HeaderRow, if specified (or not equal to 0) will write the column names in given row 4. Template, if specified CFX_Excel will use the given file as a base for writing query data. By using template, you can add your company logo, formulas, chart or any other Excel object prior to adding the data from query. The resulting XLS file will be the original template + query data. 5. InsertRow, true means CFX_Excel will insert row starting at 'StartRow' position. Thus shifting below all other rows. Mostly usable when you use Template, so the data will not overwrite anything in the template file. 6. New in V2 is PreserveStyle. True means CFX_Excel will try to keep the original style of each cell as found in template. If cell style and query data doesn't match, CFX_Excel will try to format the cell with datatype of query, thus overwriting the template.
Note
Prior to purchasing CFX_Excel, we strongly suggest you to download CFX_Excel evaluation version first from this link. This way, you can assure the custom tag works perfectly in your server environment.
|