Re: Fails to open Excel
From: ZW (anonymous_at_discussions.microsoft.com)
Date: 01/05/05
- Next message: ACaunter: "Cancel Left-Click Options"
- Previous message: Craig HB: "opening a new browser"
- In reply to: Dan Bass: "Re: Fails to open Excel"
- Next in thread: Dan Bass: "Re: Fails to open Excel"
- Reply: Dan Bass: "Re: Fails to open Excel"
- Reply: Dan Bass: "Re: Fails to open Excel"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 Jan 2005 06:44:06 -0800
IE 6 (sp1) and Office 2000.
BTW I tried IE in one computer with Office 97, it seems OK.
>-----Original Message-----
>What version of IE, and what version of Office do you
have installed?
>
>"ZW" <anonymous@discussions.microsoft.com> wrote in
message
>news:132a01c4f295$99be9730$a301280a@phx.gbl...
>> Hi Don,
>>
>> Thanks for the reply.
>>
>> However, it doesn't work.
>>
>> Although I didn't mention, I already use
>> datagrid.RenderControl(HtmlTextWriter) put data to
>> StringWriter in DataGrid page and save the data in
>> Session, then in the excel report page retrieve the data
>> and write to Response. As I mentioned, the weird thing
is
>> it works fine in Netscape, but not work for IE.
>>
>> ZW
>>>-----Original Message-----
>>>remove the line ClearControls from my method.
>>>
>>>"ZW" <anonymous@discussions.microsoft.com> wrote in
>> message
>>>news:046101c4f279$b8d5f210$a601280a@phx.gbl...
>>>> Hi there,
>>>>
>>>> I use following code to convert a datagrid data to
>> Excel.
>>>> However, if I use IE to access the page, it opens an
>> empty
>>>> excel page. If I access it by Netscape, it can open it
>>>> with excel (or save it). Does any one have experience
to
>>>> fix the problem?
>>>>
>>>> //
>>>> Response.ClearContent();
>>>> Response.ClearHeaders();
>>>> Response.ContentType = "application/vnd.ms-excel";
>>>> //Response.ContentType = "application/x-msexcel"; //
>> Same
>>>> result
>>>> Response.Charset = string.Empty ;
>>>> this.EnableViewState = false;
>>>> object content = Session["datagrid"];
>>>> if (content != null)
>>>> {
>>>> Response.Write(content.ToString());
>>>> Response.End();
>>>> }
>>>>
>>>>
>>>> TIA
>>>>
>>>> ZW
>>>
>>>
>>>.
>>>
>
>
>.
>
- Next message: ACaunter: "Cancel Left-Click Options"
- Previous message: Craig HB: "opening a new browser"
- In reply to: Dan Bass: "Re: Fails to open Excel"
- Next in thread: Dan Bass: "Re: Fails to open Excel"
- Reply: Dan Bass: "Re: Fails to open Excel"
- Reply: Dan Bass: "Re: Fails to open Excel"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|