VB .net 2005 and Excel



    What is the code to read in columns in an excel sheet for 2003 or 2007. I know you have to do a connection string like Access etc. Also there is a specific Statement to select the columns you want. Thanks.
    Saturday, April 26, 2008 8:03 PM


  • Hi Tvb2727,

    There are two methods about this scenario.

    1. Excel automation. Read this KB article about how to.
    2. Using ADO.Net to fetch the data. You need to use the corresponding column name to implement this.

     _command.CommandText = "SELECT value FROM [Sheet1$]"

    Best regards,
    Monday, April 28, 2008 3:13 AM