|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi,
I am trying to create a report in xls format using ASP. I need to do some formatting to the report. To do this, I'm using xml. But, somehow, I cannot get the columns to autofit causing the report not to print in one page. What am I missing? Any help is greatly appreciated. Here is the code ****************** <% Response.Contenttype="application/vnd.ms-excel" Response.AddHeader "content-disposition", "attachment; filename=Report" strHeader = "User criteria goes here" %> <HTML xmlns:x="urn:schemas-microsoft-com:office:excel"> <HEAD> <style> <!-- td {mso-width-source:auto;} col {mso-width-source:auto;} @page { mso-header-data:"&CDate\: &D\000A<%=strHeader%>"; mso-footer-data:"&CPage &P"; mso-page-orientation:landscape; margin:1in .3in .6in .4in; } br { mso-data-placement:same-cell; mso-width-source:auto; } newclass { mso-width-source:auto; } --> </style> <!--[if gte mso 9]><xml> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> <x:Name><%=selectedReport%></x:Name> <x:WorksheetOptions> <x:Print> <x:ValidPrinterInfo/> </x:Print> <x:Panes> <x:Pane> <x:Number>3</x:Number> </x:Pane> </x:Panes> </x:WorksheetOptions> </x:ExcelWorksheet> </x:ExcelWorksheets> </x:ExcelWorkbook> </xml><![endif]--> </HEAD> <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> <table border=1 align=center width='70%'> <TR> <TD align=center><strong>Big<BR>Big<BR>Header</TD> <TD align=center><strong>I<BR>want<BR>this<BR>in one<BR>cell</TD> <TD align=center><strong>Big<BR>Big<BR>Header2</TD> <TD align=center><strong>Big<BR>Big<BR>Biiig</TD> <TD align=center><strong>Some<BR>Small</TD> <TD align=center><strong>Column</TD> <TD align=center><strong>Number</TD> <TD align=center><strong>%</TD> <TD align=center><strong>Everything</TD> </TR> </table> </body> </html> Last edited by gita : September 26th, 2003 at 10:33 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > column autofit in xls using ASP contenttype |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|