For those of you using my POI Utility ColdFusion custom tags to produce formatted Excel documents for use with Microsoft Excel 2007, you might have seen documents that looks like this:
| || || |
| || |
| || || |
Here, you can see that style applied to the header row is bleeding into some of the other rows. Nathan Mische discovered that this was due to my dependence on the undocumented .hashCode() method on ColdFusion structs; he was able to fix this problem by caching the CellStyle objects using a Java Hashtable rathern than a ColdFusion struct. I have taken that logic and worked it back into both the ColdFusion 8 and ColdFusion 7 versions of the POI custom tags.
Additionally, based on a tip from Chris Pijl, I have added the ability to set the default zoom for a workbook sheet. This defaults to 100% and can be overridden using a percentage value.
The latest code can be downloaded from my POI Utility project page.
Looking For A New Job?
Ooops, there are no jobs. Post one now for only $29 and own this real estate!
is it possible to add support to the poi library to allow embedding images
into an excel document? I am specifically thinking about taking a PNG
CFCHART and embedding it into excel
Glad you enjoyed my post about my blogs name :)
The only way I have gotten images to work is to put them manually into an existing Excel document and then using that document as Template. I have not dynamically inserted an image in yet.
Once, I fooled around with the idea of an image tag:
<poi:img file="" />
... but, I couldn't get it to work. Can't remember exactly why, bit I think the image insert code might not be compatible with the version of POI that ships with CF.
I was banging my head against the wall with a bug I had using the POI lib and upgraded my local version. I seem to remember reading that the image stuff is newer than the ancient CF version.
The bug by the way was using the cell aliases but accidently naming the alias with the @ prefix... which mean they where @@final_score not @final_score.. doh!
Any chance of supporting it with a version check against POI? or do you have the old code lying around, I'm happy to hack it?
I never got the old code working since it was giving me class instantiation errors :(
But, I do like the idea of having some sort of version check. That woudl be awesome! What would be awesome would be to somehow ship the custom tags with the actual JAR and dynamically load the JAR with the custom tag. Not sure what kind of package collissions that would cause :) Probably will need to check with Elliott Sprehn or Mark Mandel on that topic.