в стилях (альбомная ориентация) поля страницы и поля колонтитула
@page
{margin:1.0in .75in 1.0in .75in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-page-orientation:landscape;}
после стилей вставить
<!-- Здесь подсчитывается кол-во строк -->
{%assign var="constrows1" value="19"%}
{%assign var="countrows1" value=$CONTENT|@count%}
{%assign var="allrows1" value=`$constrows1+$countrows1`%}
{%assign var="constrows2" value="29"%}
{%assign var="countrows2" value=$CONTENT|@count%}
{%assign var="allrows2" value=`$allrows1+$constrows2+$countrows2`%}
{%assign var="constrows3" value="90"%}
{%assign var="countrows3" value=$CONTENT|@count%}
{%assign var="allrows3" value=`$allrows1+$constrows3+$countrows3`%}
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>InvoiceDocument 2 </x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo/>
<!-- Формат листа (8 - А3, 9 - А4) -->
<x:PaperSizeIndex>8</x:PaperSizeIndex>
<x:Scale>76</x:Scale>
<x:HorizontalResolution>300</x:HorizontalResolution>
<x:VerticalResolution>300</x:VerticalResolution>
</x:Print>
<x:ShowPageBreakZoom/>
<x:Selected/>
<x:DoNotDisplayGridlines/>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
<!-- Здесь собственно формируются разрывы страниц -->
<x:PageBreaks>
<x:RowBreaks>
<x:RowBreak>
<x:Row>{%$allrows1%}</x:Row>
</x:RowBreak>
<x:RowBreak>
<x:Row>{%$allrows2%}</x:Row>
</x:RowBreak>
<x:RowBreak>
<x:Row>{%$allrows3%}</x:Row>
</x:RowBreak>
</x:RowBreaks>
</x:PageBreaks>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>17170</x:WindowHeight>
<x:WindowWidth>24780</x:WindowWidth>
<x:WindowTopX>240</x:WindowTopX>
<x:WindowTopY>75</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1039">
<o:colormenu v:ext="edit" strokecolor="none"/>
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>100</w:Zoom>
<w:DoNotHyphenateCaps/>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>0 пт</w:DrawingGridHorizontalSpacing>
<w:DrawingGridVerticalSpacing>0 пт</w:DrawingGridVerticalSpacing>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles>
</xml><![endif]-->
<x:Scale>76</x:Scale> - масштаб при печати (если необходимо вместить)
Leave a Comment