C
Chris Dunaway
On my page, which is a simple report, I have a checkbox which will
cause the report to be opened in excel. I do this with the following
code in the button click:
if (chkViewInExcel.Checked)
{
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = Encoding.Default;
Response.AddHeader("Content-Disposition",
"attachment;filename=ExcelReport.xls");
}
This seems to work ok if I have my styles inlined in the aspx page.
But if I use a <link> tag to load the stylesheet, then Excel complains
that it cannot find the style sheet. The path it gives is in my
documents and setting folder on the client. It doesn't seem to want
to load the styles from the web server.
Can anyone shed some light on this for me?
Thanks,
Chris
cause the report to be opened in excel. I do this with the following
code in the button click:
if (chkViewInExcel.Checked)
{
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = Encoding.Default;
Response.AddHeader("Content-Disposition",
"attachment;filename=ExcelReport.xls");
}
This seems to work ok if I have my styles inlined in the aspx page.
But if I use a <link> tag to load the stylesheet, then Excel complains
that it cannot find the style sheet. The path it gives is in my
documents and setting folder on the client. It doesn't seem to want
to load the styles from the web server.
Can anyone shed some light on this for me?
Thanks,
Chris