Question: i want to allow the user to upload xls file with 9 columns and unlimited number of rows.
i will run over everyline and insert the data to the db

how do i read the xls file?

Answer: 
You can read the XLS by opening an ADO recordset which pulls in the spreadsheet's data.

This example reads data from a spreadsheet named Billing Summary which includes column names in the first row..

```
Public Sub ReadSpreadsheet() 
    Const cstrFolder As String = "C:\Access\webforums" 
    Const cstrFile As String = "ExampleFinance.xls" 
    Dim strConnect As String 
    Dim strSql As String 

    Dim cn As Object 
    Dim rs As Object 
    Set cn = CreateObject("ADODB.Connection") 
    Set rs = CreateObject("ADODB.Recordset") 

    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ 
        cstrFolder & Chr(92) & cstrFile & _ 
        ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";" 
    cn.Open strConnect 
    strSql = "SELECT * FROM [Billing Summary$] WHERE SomeField Is Not Null;" 
    rs.Open strSql, cn 

    Do While Not rs.EOF 
        '* do something with each row of data *'
        'Debug.Print rs!SomeField '
        rs.MoveNext 
    Loop 

    rs.Close 
    Set rs = Nothing 
    cn.Close 
    Set cn = Nothing 
End Sub 

```

If that particular connection string doesn't work for you, look at other examples of Excel connection strings at [Connection strings for Excel](http://www.connectionstrings.com/excel)

**Edit**: That example works in Access. But you said ASP. I think it will work there, too, if you drop the data types from the variable and constant declarations: `Dim strSql` instead of `Dim strSql As String`
In C#, I had to load an excel spreadsheet to a DataSet - this got me there...

[Code Project Example](http://www.codeproject.com/KB/office/ExcelToDataset.aspx)

I used Option 1 - the Preferred method! Hope this helps...

Mike