Excel Workbook in IE

Discussion in 'ASP .Net' started by =?Utf-8?B?SmVycnkgSg==?=, May 13, 2005.

  1. I am sending Excel reports to web clients. Excel opens in internet explorer
    displaying multiple sheets. It is pretty simple to do and works well. To do
    it, a client clicks a link to an ASPX page that first generates Excel.htm
    files (query string contains parameters for the specific reports) then uses
    Response.Write() to stream and Excel workbook file back to the client. The
    Workbook file, internally contains links to the Excel.htm files that were
    just created.

    The Excel workbook file that is sent back to the client looks similar to this:

    <html xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
    xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
    <head>
    <meta name="Excel Workbook Frameset">
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <meta name=ProgId content=Excel.Sheet>
    <meta name=Generator content="Microsoft Excel 9">
    <xml>
    <x:ExcelWorkbook>
    <x:ExcelWorksheets>
    <x:ExcelWorksheet>
    <x:Name>Name of Sheet 1</x:Name>
    <x:WorksheetSource HRef="sheet1.htm"/>
    </x:ExcelWorksheet>
    <x:ExcelWorksheet>
    <x:Name>Work sheet 2</x:Name>
    <x:WorksheetSource HRef="sheet2.htm"/>
    </x:ExcelWorksheet>
    </x:ExcelWorkbook>
    </xml>
    </head>
    </html>


    When IE receives the above HTML text (the workbook definition) excel
    automatically looks for and retrieves sheet1.htm and sheet2.htm.

    It all works great!

    My problem is if there is more then one client hitting the server at the
    same time. If this happens, then one of the clients might be trying to
    generate the sheet.htm files when another one is retrieveing them. I would
    have no problem using an Application.Lock if I could know when any one client
    is done retrieving the files.

    Can someone give me a solution?

    I would appreciate it.

    --
    Jerry J
    =?Utf-8?B?SmVycnkgSg==?=, May 13, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?SmVycnkgSg==?=

    Marina Guest

    As soon as your page is done Response.Write 'ing, you should be able to
    release the lock. After that it is traveling to the client's PC.

    "Jerry J" <> wrote in message
    news:...
    >I am sending Excel reports to web clients. Excel opens in internet
    >explorer
    > displaying multiple sheets. It is pretty simple to do and works well. To
    > do
    > it, a client clicks a link to an ASPX page that first generates Excel.htm
    > files (query string contains parameters for the specific reports) then
    > uses
    > Response.Write() to stream and Excel workbook file back to the client.
    > The
    > Workbook file, internally contains links to the Excel.htm files that were
    > just created.
    >
    > The Excel workbook file that is sent back to the client looks similar to
    > this:
    >
    > <html xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
    > xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
    > xmlns="http://www.w3.org/TR/REC-html40">
    > <head>
    > <meta name="Excel Workbook Frameset">
    > <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    > <meta name=ProgId content=Excel.Sheet>
    > <meta name=Generator content="Microsoft Excel 9">
    > <xml>
    > <x:ExcelWorkbook>
    > <x:ExcelWorksheets>
    > <x:ExcelWorksheet>
    > <x:Name>Name of Sheet 1</x:Name>
    > <x:WorksheetSource HRef="sheet1.htm"/>
    > </x:ExcelWorksheet>
    > <x:ExcelWorksheet>
    > <x:Name>Work sheet 2</x:Name>
    > <x:WorksheetSource HRef="sheet2.htm"/>
    > </x:ExcelWorksheet>
    > </x:ExcelWorkbook>
    > </xml>
    > </head>
    > </html>
    >
    >
    > When IE receives the above HTML text (the workbook definition) excel
    > automatically looks for and retrieves sheet1.htm and sheet2.htm.
    >
    > It all works great!
    >
    > My problem is if there is more then one client hitting the server at the
    > same time. If this happens, then one of the clients might be trying to
    > generate the sheet.htm files when another one is retrieveing them. I
    > would
    > have no problem using an Application.Lock if I could know when any one
    > client
    > is done retrieving the files.
    >
    > Can someone give me a solution?
    >
    > I would appreciate it.
    >
    > --
    > Jerry J
    Marina, May 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. philip herman

    'Document not saved' error - excel workbook

    philip herman, Jul 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    5,431
    philip herman
    Jul 11, 2003
  2. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Excel _WorkBook vs. Excel.Workbook

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Sep 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,624
    Steve C. Orr [MVP, MCSD]
    Sep 29, 2004
  3. Winshent
    Replies:
    0
    Views:
    1,941
    Winshent
    Nov 3, 2004
  4. Yelena Kaplun
    Replies:
    1
    Views:
    5,151
    Yelena Kaplun
    Jan 19, 2005
  5. Replies:
    0
    Views:
    984
Loading...

Share This Page