2

I want to create an Excel file with ColdFusion. Until now, I was saving html and just changing the file extension. However, now I need to create a real excel file.

Any advice?

Thanks

3 Answers 3

6

Got ColdFusion 9? It is baked in with the cfspreadhseet tag (and related functions).

0
4

Or else you can use Ben Nadel's POI utility. It's pretty simple. We've been using it for years to make spreadsheets with multiple worksheets.

http://www.bennadel.com/projects/poi-utility.htm

1
  • Everything seems complicated at first when it comes to programming with other people's code. However, the light will shine through if you spend even 30 minutes with the POI utility.
    – J.T.
    Oct 12, 2010 at 13:44
1

Depending on the complexity of the sheet you could just generate the XML for a xlsx file in a bunch of nested cfloops. Export a sheet as XML and take a look.

1
  • I did it this was with a .NET winforms app once. Quite frankly, this is the quickest way to do it. As long as you xml escape all the text you should be fine. Its likely this method will perform better than any other solution as well. Oct 11, 2010 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.