Results 1 to 2 of 2
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing Excel files (VB.Net)

    I have VS.Net Enterprise Architect Beta 3 installed and have starting playing around with it. I'd like to use some Excel files as a data source and have been reading up on ADO.Net. I also have SQL Server installed and can get the sample databases to load in a datagrid (with help from a book I have) so that part works fine.

    From what I've been reading so far, the data source can be pretty much anything from a text file, XML, spreadsheet, etc. I can't find any examples, though on reading Excel spreadsheets. How do they need to be formatted to be read as a datasource? I have seen references to this but no sample code, all samples are for regular database tables. <img src=/S/blackteeth.gif border=0 alt=blackteeth width=20 height=20>

    Do I put each 'table' on its own sheet? Do I need column heades that match the field names in the destination database table? <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Thnx, Deb

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Importing Excel files (VB.Net)

    Maybe you could download some sample code for ADO-to-Excel (pre .NET), and use the conversion wizard? I don't have any code handy, but maybe you do or maybe you can find some at microsoft.com.

Posting Permissions

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