Results 1 to 2 of 2

Thread: [RESOLVED] Error in reading excel 07 from vb.net 2005

  1. #1

    Thread Starter
    Addicted Member scsfdev's Avatar
    Join Date
    Feb 2008
    Location
    Singapore
    Posts
    224

    Resolved [RESOLVED] Error in reading excel 07 from vb.net 2005

    Hi all,
    i have the following error.

    Code:
    'Sheet1$' is not a valid name.  Make sure that it does not include invalid characters or punctuation and that it is not too long.
    At first, I can read the same excel file with the same sheet name without this error.
    but now i change the development PC and it hit this error.

    I'm using Excel 2007 with VB.Net 2005.
    Here is my connection string:
    Code:
    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strFile & ";Extended Properties=""Excel 12.0 Xml;HDR=YES"";"
    And I also added the COM references for Microsoft Excel Object 12.0 in my project.

    Any idea??

    Help

    Thanks.
    scsfdev
    I'm using VS 2005 & 2008 & 2010 with SQL Server 2005 Express.

    My hobby beside programming: http://dslrstranger.wordpress.com

  2. #2

    Thread Starter
    Addicted Member scsfdev's Avatar
    Join Date
    Feb 2008
    Location
    Singapore
    Posts
    224

    Re: Error in reading excel 07 from vb.net 2005

    Sorry my bad.

    I pointed to the wrong excel file that's why it can't find the sheet name.

    sorry to bother u guys.
    I'm using VS 2005 & 2008 & 2010 with SQL Server 2005 Express.

    My hobby beside programming: http://dslrstranger.wordpress.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
  •  



Click Here to Expand Forum to Full Width