2009-03-09 19 views
0

次の方法を使用して、ASP.NETアプリケーションでHTMLから動的Excelレポートを作成しています。C#のページ設定オプションを設定するExcelレポート

エクセルレポートを作成する際に、レポートが1ページに収まるようにページ設定オプションを設定したいとします。

これは、Excelレポートを作成するために使用しているアプローチです... このレポートを1ページに収めたり、レポートを拡大表示する方法を教えてください。

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); 

答えて