Results 1 to 2 of 2

Thread: accessing Excel data from VB

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186

    Post

    Hello there,

    I would really appreciate if you could show me howto do the following:

    I want to access data stored in an excel spreadsheet. Then once I got the data I want to save it to an SQL Server database.

    Please advise, code samples most welcome.

    Thanx in advance

    André

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    This has been asked before and I will re-iterate the problems I had when I tried to do just this. DON'T!!

    Copy the data into MS Access and then read it from there. You will have all sorts of problems reading it directly from Excel. Microsoft admit there are bugs reading data from Excel.

    Example;

    ColumnA
    123
    234
    345
    456

    Pretend that 123 is formatted as a string - when Excel reads the data in this column it will decide that the data is numeric because most of the rows are just that. However, if it comes across a string like "123" it will NOT translate that to 123 but return NULL to your program. This will DRIVE YOU MAD.

    DON'T do it.

    You have been warned.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width