Results 1 to 2 of 2

Thread: Acessing Excel Spreadsheets with ASP.

  1. #1
    Marc Concannon Guest

    Acessing Excel Spreadsheets with ASP.

    HI.

    Does anyone know how to access different sheets on a excel spreadshhet with ASP.

    we are using is a DSN connection.

    It has different sheets.

    So how do you create a connection to the different sheets???

  2. #2
    Fk Guest

    Acessing Excel Spreadsheets with ASP. (reply)

    Marc,
    Try the following... change the EP to Pro.
    Fk
    --------------------------------------------------------------
    <HR>
    dbSQL=&#34;SELECT * FROM RangeName&#34;<BR>
    RangeName Must be a Defined Name<BR>
    Also, SS cannot be password protected.
    <HR>
    <%
    Set X=Server.CreateObject(&#34;AspDB.EP21&#34
    X.dbUnit=1
    x.dbsql=&#34;select * from quote66&#34;
    mdb=&#34;e:Vdataquote.xls&#34;
    X.dbDSN = &#34;driver={Microsoft excel Driver (*.xls)}; DriverID=790; dbq=&#34; + mdb
    X.aspdbEP
    %>
    <HR>
    <B>Remember that the SS cannot be openned !!!</B>
    <HR>
    <%
    Set X=Server.CreateObject(&#34;AspDB.EP21&#34
    X.dbUnit=2
    x.dbsql=&#34;select * from range1 order by [Employee ID] DESC&#34;
    mdb=&#34;e:Vdataemployees.xls&#34;
    X.dbDSN = &#34;driver={Microsoft excel Driver (*.xls)}; dbq=&#34; + mdb
    X.aspdbEP
    %>
    <HR>
    <B>Look, the Range can be on a different sheet as long as their name is unique!!! Range is on Sheet 2 </B>
    <HR>
    <%
    Set X=Server.CreateObject(&#34;AspDB.EP21&#34
    X.dbUnit=3
    x.dbsql=&#34;select * from range2&#34;
    mdb=&#34;e:Vdataemployees.xls&#34;
    X.dbDSN = &#34;driver={Microsoft excel Driver (*.xls)}; dbq=&#34; + mdb
    X.aspdbEP
    %>
    <HR>
    DriverID as follows<BR>
    25 (Microsoft Access)
    21 (dBASE III)
    277 (dBASE IV)
    533 (dBASE 5.0)
    534 (Microsoft Excel 3.0)
    278 (Microsoft Excel 4.0)
    22 (Microsoft Excel 5.0/7.0)
    790 (Microsoft Excel 97)
    24 (Microsoft FoxPro 2.0)
    280 (Microsoft FoxPro 2.5)
    536 (Microsoft FoxPro 2.6)
    26 (Paradox 3.x)
    282 (Paradox 4.x)
    538 (Paradox 5.x)
    27 (Text)





    ------------
    Marc Concannon at 5/26/99 12:42:44 PM

    HI.

    Does anyone know how to access different sheets on a excel spreadshhet with ASP.

    we are using is a DSN connection.

    It has different sheets.

    So how do you create a connection to the different sheets???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •