Results 1 to 4 of 4

Thread: Read excel sheet

  1. #1

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    Read excel sheet

    I have a situation here..
    i have one excel file which consist of 3 sheets...
    i want to read the excel file starting from sheet 1, line by line...

    i also have one table in access which act like a comparison for the excel sheet..
    i want to read from the sheet line per line, every line will be compared to the table in ms access and after being compared it will store to another table...

    i can do if the file is comma delimeted csv or txt file but this is an Excel file.
    i attach the file here so anyone can see what i'm trying to do.

    thanks in advanced.
    Attached Files Attached Files
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Read excel sheet

    This might be a good start... Reference Microsoft Excel Object

    VB Code:
    1. Private xlApp           As Excel.Application
    2. Private xlWB            As Excel.Workbook
    3. Private xlWS1           As Excel.Worksheet
    4. Private xlWS2           As Excel.Worksheet
    5.  
    6. Private Sub Form_Load()
    7.     Set xlApp = New Excel.Application
    8.     Set xlWB = xlApp.Workbooks.Open("C:\Rework cost responsibility Center.xls")
    9.     Set xlWS1 = xlWB.Sheets("Rework cost responsibility Cent")
    10.     Set xlWS2 = xlWB.Sheets("QIT")
    11. End Sub
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Hyperactive Member Apek's Avatar
    Join Date
    Aug 2002
    Location
    Kg Melayu,2 33 °N,102 10 °E
    Posts
    283

    Re: Read excel sheet

    sorry...please dont assume i'm a vb expertise...
    what's the code suppose to mean?
    "The reason you see open source there at all is because we came in and said there should be a platform that's identical with millions and millions of machines."
    Get it HERE


    Regards..
    Apek

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Read excel sheet

    It looks like it is opening an instance of Excel, then opening a specific spreadsheet and displaying it within that instance. Once opened, it is opening a specific sheet of the spreadsheet.

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