ASP Excel Reading

Posted on 2004-11-11
Last Modified: 2008-03-10
Dear Friends,

As everybody tries I am trying to read an Excel workbook from an ASP page. The following code works OK but I want to place my Excel Workbook and ASP page at the same folder and want to give a relative path.

Set wb = GetObject("c:\dene.xls")
Set ws = wb.Worksheets(1)
str = ws.Cells(1, 1)

how can I use relative path instead of an absolute one ?
Question by:MacroLand
    LVL 6

    Accepted Solution

    i think you need the absolute path but you can take the relative path and transform it like this

    Set wb = GetObject(Server.MapPath("/xlsdir/dene.xls"))
    LVL 4

    Author Comment

    thanks that helped too much
    I appreciate your help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now