tags:

views:

202

answers:

1

I am using the following approach to create a dynamic Excel Report from HTML in my ASP.NET Application.

While creating the excel report, I want to set the Page Setup options such that the report fits into one page.

This is the approach I'm using to create the excel report... Please tell me how to fit this report to one page or to zoom in the report?

    string sContentType = "application/vnd.excel";
    string sFileName = "Detail Qutation.xls";
    Hashtable oData = new Hashtable();
    oData.Add("Content-Disposition", "attachment;filename=" + sFileName);           
    oData.Add("Charset", "");
    oData.Add("ContentType", sContentType);
    oData.Add("Content", sTable.ToString());
    oData.Add("IsBinaryContent", false);
    this.StoreObject("Document", oData);
A: 

You might need to render using htmltextwriter as explained in

http://forums.asp.net/p/1063850/1538066.aspx#1538066

and take the concept to get a solution.

lakshmanaraj