viewing excel spread sheet in Internet explorer.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: viewing excel spread sheet in Internet explorer.

Hybrid View

  1. #1
    Kashi Guest

    viewing excel spread sheet in Internet explorer.


    Hi,
    Can any boby please tell me how to view excel spread sheet in the IE5 and
    what is the html code I need to write to open the excel application inside
    the web browser and view the spread sheet.

    Thanking you,
    Regards,
    Raj

  2. #2
    Russell Jones Guest

    Re: viewing excel spread sheet in Internet explorer.

    You don't need any HTML. If you request an Excel file, IE will open Excel
    automatically to view the file. Older versions open Excel as a separate
    window; newer versions open Excel as an ActiveX document inside the browser
    window.


    "Kashi" <kashi_p_r@hotmail.com> wrote in message
    news:3bb9c484$1@news.devx.com...
    >
    > Hi,
    > Can any boby please tell me how to view excel spread sheet in the IE5 and
    > what is the html code I need to write to open the excel application inside
    > the web browser and view the spread sheet.
    >
    > Thanking you,
    > Regards,
    > Raj




  3. #3
    Kashi Guest

    Re: viewing excel spread sheet in Internet explorer.


    Hi Russel,
    Thank you for your response, I should have been clear on what I'm doing.
    This is phase II of the Intranet application. What we are doing is building
    ASP pages on the fly using vb web classes. One of the requirement from the
    user is to export the reports into excel spread sheet. I could export the
    report to excel, since the application is running at the server end, what
    we decided is to create a directory and save the export excel file and at
    the user end map that drive and ask them to open manually. Since users has
    to do manually opening them. What I'm looking is able to open excel inside
    the browser and open that file.

    If any thing done some thing like this, can you please detail me.

    Thanking you
    Regards,
    Raj


    "Russell Jones" <arj1@northstate.net> wrote:
    >You don't need any HTML. If you request an Excel file, IE will open Excel
    >automatically to view the file. Older versions open Excel as a separate
    >window; newer versions open Excel as an ActiveX document inside the browser
    >window.
    >
    >
    >"Kashi" <kashi_p_r@hotmail.com> wrote in message
    >news:3bb9c484$1@news.devx.com...
    >>
    >> Hi,
    >> Can any boby please tell me how to view excel spread sheet in the IE5

    and
    >> what is the html code I need to write to open the excel application inside
    >> the web browser and view the spread sheet.
    >>
    >> Thanking you,
    >> Regards,
    >> Raj

    >
    >



  4. #4
    Russell Jones Guest

    Re: viewing excel spread sheet in Internet explorer.

    But that's exactly my point. You already have the Excel file on the server.
    You don't need to map the clients. Instead, map an IIS virtual directory to
    the directory containing the Excel files and redirect the brower to the
    appropriate file in that directory.

    "Kashi" <kashi_p_r@hotmail.com> wrote in message
    news:3bba664d$1@news.devx.com...
    >
    > Hi Russel,
    > Thank you for your response, I should have been clear on what I'm doing.
    > This is phase II of the Intranet application. What we are doing is

    building
    > ASP pages on the fly using vb web classes. One of the requirement from the
    > user is to export the reports into excel spread sheet. I could export the
    > report to excel, since the application is running at the server end, what
    > we decided is to create a directory and save the export excel file and at
    > the user end map that drive and ask them to open manually. Since users has
    > to do manually opening them. What I'm looking is able to open excel inside
    > the browser and open that file.
    >
    > If any thing done some thing like this, can you please detail me.
    >
    > Thanking you
    > Regards,
    > Raj
    >
    >
    > "Russell Jones" <arj1@northstate.net> wrote:
    > >You don't need any HTML. If you request an Excel file, IE will open Excel
    > >automatically to view the file. Older versions open Excel as a separate
    > >window; newer versions open Excel as an ActiveX document inside the

    browser
    > >window.
    > >
    > >
    > >"Kashi" <kashi_p_r@hotmail.com> wrote in message
    > >news:3bb9c484$1@news.devx.com...
    > >>
    > >> Hi,
    > >> Can any boby please tell me how to view excel spread sheet in the IE5

    > and
    > >> what is the html code I need to write to open the excel application

    inside
    > >> the web browser and view the spread sheet.
    > >>
    > >> Thanking you,
    > >> Regards,
    > >> Raj

    > >
    > >

    >




  5. #5
    Paul Guest

    Re: viewing excel spread sheet in Internet explorer.


    Raj,
    I think there are a couple of ways of doing this. One is to include the following
    before the <head> tag in your ASP file:

    Response.ContentType = "application/vnd.ms-excel"

    Check out http://support.microsoft.com/support.../Q260/2/39.ASP
    and http://support.microsoft.com/support.../Q199/8/41.ASP for more
    info. If you put the code into Google.com you will also get a load more examples.

    I think there may also be a way of outputting to Excel using 'text/csv' as
    the output type in the meta tags as a CSV file is ususally associated with
    Excel. I'm afraid I can't remember where I have read this !!

    Hope this helps.

    Paul

  6. #6
    kashi Guest

    Re: viewing excel spread sheet in Internet explorer.


    Hi,
    Thank you for the response, I get around the issue of opening excel file
    by archoring href on the file with that I can open the excel file in the
    browser. The work around I made is maping the client m/c to that excel directory
    in the server. But from your replay that created me curiousity on how to
    do with out mapping the client m/c.

    Is it possible for you to replay me in detail on how to make IIS virtual
    directory in step by step please.

    Thanking you,
    Regards,
    Raj

    "Russell Jones" <arj1@northstate.net> wrote:
    >But that's exactly my point. You already have the Excel file on the server.
    >You don't need to map the clients. Instead, map an IIS virtual directory

    to
    >the directory containing the Excel files and redirect the brower to the
    >appropriate file in that directory.
    >
    >"Kashi" <kashi_p_r@hotmail.com> wrote in message
    >news:3bba664d$1@news.devx.com...
    >>
    >> Hi Russel,
    >> Thank you for your response, I should have been clear on what I'm doing.
    >> This is phase II of the Intranet application. What we are doing is

    >building
    >> ASP pages on the fly using vb web classes. One of the requirement from

    the
    >> user is to export the reports into excel spread sheet. I could export

    the
    >> report to excel, since the application is running at the server end, what
    >> we decided is to create a directory and save the export excel file and

    at
    >> the user end map that drive and ask them to open manually. Since users

    has
    >> to do manually opening them. What I'm looking is able to open excel inside
    >> the browser and open that file.
    >>
    >> If any thing done some thing like this, can you please detail me.
    >>
    >> Thanking you
    >> Regards,
    >> Raj
    >>
    >>
    >> "Russell Jones" <arj1@northstate.net> wrote:
    >> >You don't need any HTML. If you request an Excel file, IE will open Excel
    >> >automatically to view the file. Older versions open Excel as a separate
    >> >window; newer versions open Excel as an ActiveX document inside the

    >browser
    >> >window.
    >> >
    >> >
    >> >"Kashi" <kashi_p_r@hotmail.com> wrote in message
    >> >news:3bb9c484$1@news.devx.com...
    >> >>
    >> >> Hi,
    >> >> Can any boby please tell me how to view excel spread sheet in the IE5

    >> and
    >> >> what is the html code I need to write to open the excel application

    >inside
    >> >> the web browser and view the spread sheet.
    >> >>
    >> >> Thanking you,
    >> >> Regards,
    >> >> Raj
    >> >
    >> >

    >>

    >
    >



  7. #7
    Bryce Budd Guest

    Re: viewing excel spread sheet in Internet explorer.


    Guys,

    Here is a working example...
    <%@ language=vbscript %>
    <%
    response.buffer = true
    response.ContentType = "application/vnd.ms-excel"
    response.AddHeader "content-disposition", "inline; filename=dynamic.xls"

    response.write "<table width=200>"
    response.write "<tr>"
    for i = 1 to 4
    response.write "<td width=60>"
    response.write "<b>Col " & i & "</b>"
    response.write "</td>"
    next
    response.write "<td width=60 align=""center""><b>Total</b></td>"
    response.write "</tr>"
    response.write "<tr>"
    for i = 1 to 4
    response.write "<td width=60 align=""center"">"
    response.write i + i
    response.write "</td>"
    next
    response.write "<td width=60 align=""center""><b>=sum(A22)</b></td>"
    response.write "</tr>"
    response.write "<tr>"
    for i = 5 to 8
    response.write "<td width=60 align=""center"">"
    response.write i + i
    response.write "</td>"
    next
    response.write "<td width=60 align=""center""><b>=sum(A33)</b></td>"
    response.write "</tr>"
    response.write "<tr>"
    for i = 9 to 12
    response.write "<td width=60 align=""center"">"
    response.write i + i
    response.write "</td>"
    next
    response.write "<td width=60 align=""center""><b>=sum(A44)</b></td>"
    response.write "</tr>"
    response.write "<tr>"
    for i = 13 to 16
    response.write "<td width=60 align=""center"">"
    response.write i + i
    response.write "</td>"
    next
    response.write "<td width=60 align=""center""><b>=sum(A55)</b></td>"
    response.write "</tr>"
    response.write "<tr>"
    for i = 1 to 4
    Select Case i
    Case 1
    Response.Write "<td width=60 align=""center""><b>=sum(A2:A5)</b></td>"
    Case 2
    Response.Write "<td width=60 align=""center""><b>=sum(B2:B5)</b></td>"
    Case 3
    Response.Write "<td width=60 align=""center""><b>=sum(C2:C5)</b></td>"
    Case 4
    Response.Write "<td width=60 align=""center""><b>=sum(D25)</b></td>"
    End Select
    next
    response.write "<td width=60 align=""center""><b>=sum(A66)</b></td>"
    response.write "</tr>"
    response.write "</table>"

    response.flush
    response.end

    %>

    Load this .asp into IIS....run the page. Browser will prompt you to save
    or run....if you save it will use the file name in the header of the ASP
    if you run it will open in IE with Excel... Notice you can actually embed
    Excel functions directly into the web page and format the cells, columns
    and rows with HTML. Note: this will only work with Excel 97 and above.


    Enjoy.




    <!-- Original Message -->
    "Paul" <P.Jackson@wlv.ac.uk> wrote:
    >
    >Raj,
    >I think there are a couple of ways of doing this. One is to include the

    following
    >before the <head> tag in your ASP file:
    >
    >Response.ContentType = "application/vnd.ms-excel"
    >
    >Check out http://support.microsoft.com/support.../Q260/2/39.ASP
    >and http://support.microsoft.com/support.../Q199/8/41.ASP for more
    >info. If you put the code into Google.com you will also get a load more

    examples.
    >
    >I think there may also be a way of outputting to Excel using 'text/csv'

    as
    >the output type in the meta tags as a CSV file is ususally associated with
    >Excel. I'm afraid I can't remember where I have read this !!
    >
    >Hope this helps.
    >
    >Paul



  8. #8
    Mukesh Kumar Guest

    Re: viewing excel spread sheet in Internet explorer.


    Hi Kashi

    The problem you are trying to solve is very common, because of the widespread
    use of
    excel in the user community. And the solution suggested by Russel is much
    cleaner and
    flexible than the approach you took. The way you do in IIS is outline as
    follows:
    1. Assuming you already have the directory created on server. Go to the Advanced
    options
    2. To add virtual link, browse and select the directory containing the excel
    files.
    2. give the alias name
    3. give the read permission
    4. Select OK and get back to the advanced options.
    5. select the checkbox at the bottom which says "Allow Directory Browsing"

    If the explorer is selected to handle MIME type for excel (which IE is) the
    user
    can click the link on the page and see it in the explorer. wheather it opens

    the excel within the browser (in-place automation) or outside in excel depends

    on other browser settings. But regardless of it, you do not require to map
    anything
    of the server side on client side and thus keep them de-coupled.

    I hope this helps
    Mukesh
    "kashi" <kashi_p_r@hotmail.com> wrote:
    >
    >Hi,
    >Thank you for the response, I get around the issue of opening excel file
    >by archoring href on the file with that I can open the excel file in the
    >browser. The work around I made is maping the client m/c to that excel directory
    >in the server. But from your replay that created me curiousity on how to
    >do with out mapping the client m/c.
    >
    >Is it possible for you to replay me in detail on how to make IIS virtual
    >directory in step by step please.
    >
    >Thanking you,
    >Regards,
    >Raj
    >
    >"Russell Jones" <arj1@northstate.net> wrote:
    >>But that's exactly my point. You already have the Excel file on the server.
    >>You don't need to map the clients. Instead, map an IIS virtual directory

    >to
    >>the directory containing the Excel files and redirect the brower to the
    >>appropriate file in that directory.
    >>
    >>"Kashi" <kashi_p_r@hotmail.com> wrote in message
    >>news:3bba664d$1@news.devx.com...
    >>>
    >>> Hi Russel,
    >>> Thank you for your response, I should have been clear on what I'm doing.
    >>> This is phase II of the Intranet application. What we are doing is

    >>building
    >>> ASP pages on the fly using vb web classes. One of the requirement from

    >the
    >>> user is to export the reports into excel spread sheet. I could export

    >the
    >>> report to excel, since the application is running at the server end,

    what
    >>> we decided is to create a directory and save the export excel file and

    >at
    >>> the user end map that drive and ask them to open manually. Since users

    >has
    >>> to do manually opening them. What I'm looking is able to open excel inside
    >>> the browser and open that file.
    >>>
    >>> If any thing done some thing like this, can you please detail me.
    >>>
    >>> Thanking you
    >>> Regards,
    >>> Raj
    >>>
    >>>
    >>> "Russell Jones" <arj1@northstate.net> wrote:
    >>> >You don't need any HTML. If you request an Excel file, IE will open

    Excel
    >>> >automatically to view the file. Older versions open Excel as a separate
    >>> >window; newer versions open Excel as an ActiveX document inside the

    >>browser
    >>> >window.
    >>> >
    >>> >
    >>> >"Kashi" <kashi_p_r@hotmail.com> wrote in message
    >>> >news:3bb9c484$1@news.devx.com...
    >>> >>
    >>> >> Hi,
    >>> >> Can any boby please tell me how to view excel spread sheet in the

    IE5
    >>> and
    >>> >> what is the html code I need to write to open the excel application

    >>inside
    >>> >> the web browser and view the spread sheet.
    >>> >>
    >>> >> Thanking you,
    >>> >> Regards,
    >>> >> Raj
    >>> >
    >>> >
    >>>

    >>
    >>

    >



  9. #9
    Simon Guest

    Re: viewing excel spread sheet in Internet explorer.


    I was able to get the example below going in a new project.

    If I copy this code into the project I am working on a blank worksheet is
    displayed when run.

    But if the new project that I created with this code running then run the
    project that I am working it works.

    What am I doing wrong?

    Simon

    "Bryce Budd" <bbudd@fulltilt.com> wrote:
    >
    >Guys,
    >
    >Here is a working example...
    ><%@ language=vbscript %>
    ><%
    > response.buffer = true
    > response.ContentType = "application/vnd.ms-excel"
    > response.AddHeader "content-disposition", "inline; filename=dynamic.xls"
    >
    > response.write "<table width=200>"
    > response.write "<tr>"
    > for i = 1 to 4
    > response.write "<td width=60>"
    > response.write "<b>Col " & i & "</b>"
    > response.write "</td>"
    > next
    > response.write "<td width=60 align=""center""><b>Total</b></td>"
    > response.write "</tr>"
    > response.write "<tr>"
    > for i = 1 to 4
    > response.write "<td width=60 align=""center"">"
    > response.write i + i
    > response.write "</td>"
    > next
    > response.write "<td width=60 align=""center""><b>=sum(A22)</b></td>"
    > response.write "</tr>"
    > response.write "<tr>"
    > for i = 5 to 8
    > response.write "<td width=60 align=""center"">"
    > response.write i + i
    > response.write "</td>"
    > next
    > response.write "<td width=60 align=""center""><b>=sum(A33)</b></td>"
    > response.write "</tr>"
    > response.write "<tr>"
    > for i = 9 to 12
    > response.write "<td width=60 align=""center"">"
    > response.write i + i
    > response.write "</td>"
    > next
    > response.write "<td width=60 align=""center""><b>=sum(A44)</b></td>"
    > response.write "</tr>"
    > response.write "<tr>"
    > for i = 13 to 16
    > response.write "<td width=60 align=""center"">"
    > response.write i + i
    > response.write "</td>"
    > next
    > response.write "<td width=60 align=""center""><b>=sum(A55)</b></td>"
    > response.write "</tr>"
    > response.write "<tr>"
    > for i = 1 to 4
    > Select Case i
    > Case 1
    > Response.Write "<td width=60 align=""center""><b>=sum(A2:A5)</b></td>"
    > Case 2
    > Response.Write "<td width=60 align=""center""><b>=sum(B2:B5)</b></td>"
    > Case 3
    > Response.Write "<td width=60 align=""center""><b>=sum(C2:C5)</b></td>"
    > Case 4
    > Response.Write "<td width=60 align=""center""><b>=sum(D25)</b></td>"
    > End Select
    > next
    > response.write "<td width=60 align=""center""><b>=sum(A66)</b></td>"
    > response.write "</tr>"
    > response.write "</table>"
    >
    > response.flush
    > response.end
    >
    >%>
    >
    >Load this .asp into IIS....run the page. Browser will prompt you to save
    >or run....if you save it will use the file name in the header of the ASP
    >if you run it will open in IE with Excel... Notice you can actually embed
    >Excel functions directly into the web page and format the cells, columns
    >and rows with HTML. Note: this will only work with Excel 97 and above.


    >
    >
    >Enjoy.
    >
    >
    >
    >
    ><!-- Original Message -->
    >"Paul" <P.Jackson@wlv.ac.uk> wrote:
    >>
    >>Raj,
    >>I think there are a couple of ways of doing this. One is to include the

    >following
    >>before the <head> tag in your ASP file:
    >>
    >>Response.ContentType = "application/vnd.ms-excel"
    >>
    >>Check out http://support.microsoft.com/support.../Q260/2/39.ASP
    >>and http://support.microsoft.com/support.../Q199/8/41.ASP for

    more
    >>info. If you put the code into Google.com you will also get a load more

    >examples.
    >>
    >>I think there may also be a way of outputting to Excel using 'text/csv'

    >as
    >>the output type in the meta tags as a CSV file is ususally associated with
    >>Excel. I'm afraid I can't remember where I have read this !!
    >>
    >>Hope this helps.
    >>
    >>Paul

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center