0
我們使用HTML/XML/CSS導出表的每一頁上,以Excel 2007中HTML到Excel - 打印第1行
我有下面的代碼設置,這在HTML頁面加載時,它再出口將數據發送到Excel。前兩行設置爲凍結窗格,查看文檔時效果很好,但不會在每個打印頁面上打印這些行。我的所有頁面數據都以tr-th tr-td格式顯示。
該塊的底部(我已閱讀)應該在每個打印頁上打印第一行......但事實並非如此。
我也讀過....部分,應該在每一頁上打印第一行,但這似乎也不起作用。
任何意見,想法或答案讚賞!使用此組合
header("Cache-Control: public, must-revalidate");
header("Pragma: no-cache");
header ('Content-type: application/vnd.ms-excel');
header ('Content-Disposition: attachment; filename=StoreVsCompany.xls');
echo '
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<!--[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>VendorAgendaSummary</x:Name>
<x:WorksheetOptions>
<x:PageSetup>
<x:Layout x:Orientation="Portrait"/>
<x:Header x:Margin="0.3"/>
<x:Footer x:Margin="0.3"/>
<x:PageMargins x:Bottom="0.75" x:Left="0.5" x:Right="0.5" x:Top="0.75"/>
</x:PageSetup>
<x:FitToPage/>
<x:Print>
<x:FitHeight>100</x:FitHeight>
<x:ValidPrinterInfo/>
<x:HorizontalResolution>600</x:HorizontalResolution>
<x:VerticalResolution>600</x:VerticalResolution>
</x:Print>
<x:FreezePanes/>
<x:FrozenNoSplit/>
<x:SplitHorizontal>2</x:SplitHorizontal>
<x:TopRowBottomPane>2</x:TopRowBottomPane>
<x:SplitVertical>2</x:SplitVertical>
<x:LeftColumnRightPane>2</x:LeftColumnRightPane>
<x:ActivePane>0</x:ActivePane>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
</x:Pane>
<x:Pane>
<x:Number>1</x:Number>
</x:Pane>
<x:Pane>
<x:Number>2</x:Number>
</x:Pane>
<x:Pane>
<x:Number>0</x:Number>
<x:ActiveRow>0</x:ActiveRow>
<x:ActiveCol>1</x:ActiveCol>
</x:Pane>
</x:Panes>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
<x:ExcelName>
<x:Name>Print_Titles</x:Name>
<x:SheetIndex>1</x:SheetIndex>
<x:Formula>=\'strWorkBookName\'!$1:$1</x:Formula>
</x:ExcelName>
</xml>
<![endif]-->
</head>';