locked
How to read from Excel to ArrayList? RRS feed

  • Question

  • User-1104215994 posted

    Hi,

    I am reading an excel sheet as follows and I wonder how to read from excel and add to ArrayList.

    Best Regards.

    Using connection As OleDb.OleDbConnection = New OleDb.OleDbConnection(excelconnectionString)
    Dim command As OleDb.OleDbCommand = New OleDb.OleDbCommand("SELECT [VENDORID],[REQUESTDATE],[ITEMID],[PACKAGEID],
    [QUANTITY],[TOTAL],[DELIVERYID],[REQUESTTYPE],[STATUSID],[APPROVED],[DISPATCHDATE],
    [APPROVEDBY],[APPROVEDATE] FROM [Sheet1$]
    where VENDORID is not null and ItemID is not null and PACKAGEID is not null"
    , connection) connection.Open()
    Friday, August 5, 2011 10:00 AM

Answers