This content has been marked as final. Show 6 replies
Have you tested against multiple excel files? Do that? Create a simple 2 column 20 row spreadsheet and test. If you are not seeing OOMemory errors, perhaps you are hitting a null which is interpreted as end-of-file.
If you are working with some version of CFMX, Apache POI may be a better solution then COM. It allows you to do the msoffice COM APIs thru java classes. It is much better suited to cfmx then COM. POI is already distributed in CFMX7 and how cfreport outputs excel.
What is Apache POI ?
We are not allowed to install any Ms Office on our server that is why I used the com object. I will try using a test file, you are right..
And How will I check the end of file ?
Apache POI is a java package that allows you to read/write to excel files without having to create a datasource or connect via COM. As Ken mentioned - the POI package comes already installed with most versions of CFMX. We actually use the tool a fair amount, and I have seen some CFML wrappers for the Java tool floating around on the forum threads.
Take a look at the official site for some examples on how to use it:
I believe that I found the mistake on excel file..If any cell data starts with a number or a string value, the next cell under the same column should be same type...But I dont know how to fix in code wise...Any help will be appreaciated...
Example: The below wont work.
This will work:
This wont work
Are there any special characters on line 16 that could cause the problem. Again, you're probably better off going with Jakarta POI, as it is java based and already on your server if you are using CFMX 6 or 7.
Take a look at:
or do a google search for ColdFusion POI
ok..I will try that...thx