• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Read Excel Data

Participant ,
Mar 02, 2007 Mar 02, 2007

Copy link to clipboard

Copied

I am able to read through the excel file up to 15 rows...after the there is nothing what could be possible wrong ? Any help

TOPICS
Advanced techniques

Views

382

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 03, 2007 Mar 03, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

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 ?
Thx

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

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:

http://jakarta.apache.org/poi/hssf/index.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

Thank you.

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.
12
13
R-1
This will work:
1
2
3
This wont work
R-11
3
3

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 07, 2007 Mar 07, 2007

Copy link to clipboard

Copied

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:

http://www.bennadel.com/index.cfm?dax=blog:474.view

or do a google search for ColdFusion POI

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 07, 2007 Mar 07, 2007

Copy link to clipboard

Copied

LATEST
ok..I will try that...thx

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation