When using Excel "Print Titles" how to change titles halfway down the sheet
I have a classic ASP web application that outputs reports to Excel, but this is really just html.
Some reports with multiple groups and each group may span multiple pages (vertical). I know that the Pages ability allows Excel to print a specific line (or lines) on each page, however I need the name of each group to appear in the title as well. Otherwise, the title of the first group will be displayed as the name of each group.
I've seen on google groups that someone has suggested putting each group on a separate sheet, but I don't think I can easily output multiple worksheets - or at all - using just html.
I'm looking for a quick and dirty solution as I don't have much time to devote myself to maintaining this brutal old app.
a source to share
It's a little late with the answers coming, but I think I found a solution. What you can do is open Excel, manually layout what you want, and then save it as a webpage. Open the generated file up in a simple text editor and examine the generated HTML / XML. I did this for a multi-sheet book and it seems to work.
You can do the same with multiple groups as it looks like the solution you really want, the process is the same. But the multi-sheet option will also work. Here are some interesting snippets of what Excel generated for me (from Book.htm, not Sheet files) when I saved a simple workbook with two sheets with "abc" on the first page and "def" on the second:
<script language="JavaScript">
var c_lTabs=2;
var c_rgszSh=new Array(c_lTabs);
c_rgszSh[0] = "Sheet1";
c_rgszSh[1] = "Sheet2";
------
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Sheet1</x:Name>
<x:WorksheetSource HRef="Book1_files/sheet001.htm"/>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>Sheet2</x:Name>
<x:WorksheetSource HRef="Book1_files/sheet002.htm"/>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:Stylesheet HRef="Book1_files/stylesheet.css"/>
<x:WindowHeight>13065</x:WindowHeight>
<x:WindowWidth>15315</x:WindowWidth>
<x:WindowTopX>360</x:WindowTopX>
<x:WindowTopY>75</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
</xml><![endif]-->
</head>
a source to share