Opening an XLS file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Vickers

    #1

    Opening an XLS file

    Hi,
    I am using Excel as a com object in VB.Net - anyone know how I can open an
    xls file please.

    Research seems to give me Axspreadsheet1. Workbooks.Open( ) but that doesn't
    exist.

    I can use the activesheet and copy/paste enter values in cells etc, but how
    do I open a file and load the spreadsheet

    thanks

    Pete


  • zacks@construction-imaging.com

    #2
    Re: Opening an XLS file

    On Mar 21, 8:54 am, "Pete Vickers" <pete.vick...@t hesleepdepot.co m>
    wrote:
    Hi,
    I am using Excel as a com object in VB.Net - anyone know how I can open an
    xls file please.
    >
    Research seems to give me Axspreadsheet1. Workbooks.Open( ) but that doesn't
    exist.
    >
    I can use the activesheet and copy/paste enter values in cells etc, but how
    do I open a file and load the spreadsheet
    >
    thanks
    >
    Pete
    Not sure if it is applicable in your case, but I use the Microsoft
    Excel ODBC Driver to open and read worksheets with SQLlike SELECT
    statements.

    Comment

    • RobinS

      #3
      Re: Opening an XLS file

      Are you trying to read the data out of a spreadsheet, or are you trying to
      manipulate the data *in* the spreadsheet?

      Robin S.
      -------------------------
      "Pete Vickers" <pete.vickers@t hesleepdepot.co mwrote in message
      news:ONydPf7aHH A.208@TK2MSFTNG P05.phx.gbl...
      Hi,
      I am using Excel as a com object in VB.Net - anyone know how I can open
      an xls file please.
      >
      Research seems to give me Axspreadsheet1. Workbooks.Open( ) but that
      doesn't exist.
      >
      I can use the activesheet and copy/paste enter values in cells etc, but
      how do I open a file and load the spreadsheet
      >
      thanks
      >
      Pete
      >


      Comment

      • Paul Clement

        #4
        Re: Opening an XLS file

        On Wed, 21 Mar 2007 12:54:40 -0000, "Pete Vickers" <pete.vickers@t hesleepdepot.co mwrote:

        ¤ Hi,
        ¤ I am using Excel as a com object in VB.Net - anyone know how I can open an
        ¤ xls file please.
        ¤
        ¤ Research seems to give me Axspreadsheet1. Workbooks.Open( ) but that doesn't
        ¤ exist.
        ¤
        ¤ I can use the activesheet and copy/paste enter values in cells etc, but how
        ¤ do I open a file and load the spreadsheet

        See if the following gets you started:

        How to automate Microsoft Excel from Visual Basic .NET


        How To Automate Excel from Visual Basic .NET to Fill or to Obtain Data in a Range by Using Arrays



        Paul
        ~~~~
        Microsoft MVP (Visual Basic)

        Comment

        Working...