Results 1 to 2 of 2

Thread: Read Excel in Known Format

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Read Excel in Known Format

    Hi,
    I want to create something that open and read an excel spreadsheet (that part seems easy).
    Also to read in the 5 different sheets that should be present is easy.
    I know in advance how many columns I will be looking at, and what to expect in each column.
    I just dont know know how many rows there will be...first blank one will be the end.
    Some code i tired keep running for 65,000 rows.....messing performance up completely.

    So simply want some thing that let me read the value in columns say A - X in each row, until column a's value in a certain row is nothing.

    I can write it myself if playing around I guess, but really out of time, and the person I hoped was going to do this project (from VBF!!!) seems to have disapeared.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Read Excel in Known Format

    If you just need the data and not any Excel functionality then you should use ADO.NET. You read it just like an Access database, where the file is the database and each sheet is a table. See www.connectionstrings.com fo rthe adjustments you need to make to the connection string and SQL statements.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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