HomeForum
Welcome, Guest

Odbc returns blank excel cells
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Odbc returns blank excel cells

Odbc returns blank excel cells 1 year, 2 months ago #1816

  • George
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: 0
Hello

I am pulling data from Excel file via ODBC.
Some of the cells are blank but if I open excel file they are not blank.
What is going on?
I have set IMEX to 1, HDR=Yes and TypeGuessRows to 0
Importunately It did not help.

Looking forward to your help.

George.

Re: Odbc returns blank excel cells 1 year, 2 months ago #1817

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2181
  • Karma: 12
This famous mixed data types problem

For example:

* In your eight (8) scanned rows, if the column contains five (5) numeric values and three (3) text values, the provider returns five (5) numbers and three (3) null values.
* In your eight (8) scanned rows, if the column contains three (3) numeric values and five (5) text values, the provider returns three (3) null values and five (5) text values.
* In your eight (8) scanned rows, if the column contains four (4) numeric values and four (4) text values, the provider returns four (4) numbers and four (4) null values.

As a result, if your column contains mixed values, your only recourse is to store numeric values in that column as text, and to convert them back to numbers when needed in the client application by using the Visual Basic VAL function or an equivalent.

and there is nothing you can do about it.

All solutions created by Microsoft for loading data from Excel do not work (so far).
That includes DTS, SSIS, ODBC, OleDB, Jet and .Net

My suggestion do not use ODBC or OLE DB to load data from excel

Use Advanced ETL processor. It works correctly with Excel all the time.

Load data into database and than do all sql manipulations there.

Peter

Re: Odbc returns blank excel cells 1 year, 2 months ago #1818

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2181
  • Karma: 12
Pulling data from excel no problems found
excel_to_access-20110226.GIF

Re: Odbc returns blank excel cells 1 year, 2 months ago #1819

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2181
  • Karma: 12
Doing exactly the same via ODBC

Notice that some blank cells.
excel_to_access_via_odbc.GIF

Re: Odbc returns blank excel cells 1 year, 2 months ago #1820

  • George
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Karma: 0
Thanks Mike

This certainly seems to load Excel files as a single sheet, but what happens if I want to join two sheets together or a single cell onto the end of each record?

Do I then need to use an Ole DB connection and then have the issues again regarding 255 char length, etc.?

Regards
George

Re: Odbc returns blank excel cells 1 year, 2 months ago #1821

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2181
  • Karma: 12
1 Load both of excel sheets into the database and join them there
2 use lookup object

Here is the tutorial
www.dbsoftlab.com/online-tutorials/advan...g-lookup-object.html

Mike
  • Page:
  • 1
Time to create page: 0.18 seconds

Testimonials

Our prior imports were done using VB. Our VB expert retired. No one in my group knows VB. So Visual Importer was the answer to the lack of VB skills problem my group experienced.
Ron Bradshaw,
IT Reporting Manager,
ConAgra Foods / Lamb Weston

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top