Office Excel 编程

1.活动单元格设置(行从0起,列从1起)
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
<x:ActiveRow>1</x:ActiveRow>
<x:ActiveCol>1</x:ActiveCol>
</x:Pane>
</x:Panes>

2.页面设置部分(页边距(上右下左),页眉,页脚,纸张方向)

@page
{margin:.79in .59in .43in .59in;
mso-header-margin:.39in;
mso-footer-margin:.35in;
mso-page-orientation:landscape;}

3.列宽设置部分

<table x:str border=0 cellpadding=0 cellspacing=0 width=1180 style='border-collapse:
collapse;table-layout:fixed;width:887pt'>
<col width=7 style='mso-width-source:userset;mso-width-alt:224;width:5pt'>
<col width=77 style='mso-width-source:userset;mso-width-alt:2464;width:58pt'>
<col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>
<col width=125 style='mso-width-source:userset;mso-width-alt:4000;width:94pt'>
<col width=285 style='mso-width-source:userset;mso-width-alt:9120;width:214pt'>
<col width=80 style='mso-width-source:userset;mso-width-alt:2560;width:60pt'>
<col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>
<col width=303 style='mso-width-source:userset;mso-width-alt:9696;width:227pt'>
<col width=101 style='mso-width-source:userset;mso-width-alt:3232;width:76pt'>
<col width=5 style='mso-width-source:userset;mso-width-alt:160;width:4pt'>
<tr height=6 style='mso-height-source:userset;height:4.5pt'>
<td height=6 width=7 style='height:4.5pt;width:5pt'></td>
<td width=77 style='width:58pt'></td>
<td width=101 style='width:76pt'></td>
<td width=125 style='width:94pt'></td>
<td width=285 style='width:214pt'></td>
<td width=80 style='width:60pt'></td>
<td width=101 style='width:76pt'></td>
<td width=330 style='width:248pt'></td>
<td width=101 style='width:76pt'></td>
</tr>
<col width=7 EXCEL 宽度
<col style="mso-width-alt:224" EXCEL 宽度 * 32
<col style="width:5pt" EXCEL 宽度 / 96 * 72 取整
<td width=7 HTML 显示宽度

4.SHEET 名设置部分

<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name><%=sheetname%></x:Name>

5.打印设置部分(8:A3,9:A4)

<x:Print>
<x:ValidPrinterInfo/>
<x:PaperSizeIndex>9</x:PaperSizeIndex>
<x:Scale>92</x:Scale>
<x:HorizontalResolution>600</x:HorizontalResolution>
<x:VerticalResolution>600</x:VerticalResolution>
</x:Print>

6.打印区域

<x:ExcelName>
<x:Name>Print_Area</x:Name>
<x:SheetIndex>1</x:SheetIndex>
<x:Formula>=ステップ別課題一覧表abcd!$B$2:$I$41</x:Formula>
</x:ExcelName>

 

<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>ステップ別課題一覧表abcd</x:Name>
<x:WorksheetOptions>
<x:DefaultRowHeight>270</x:DefaultRowHeight>
<x:Print>
<x:ValidPrinterInfo/>
<x:PaperSizeIndex>9</x:PaperSizeIndex>
<x:Scale>92</x:Scale>
<x:HorizontalResolution>600</x:HorizontalResolution>
<x:VerticalResolution>600</x:VerticalResolution>
</x:Print>
<x:PageBreakZoom>100</x:PageBreakZoom>
<x:Selected/>
<x:TopRowVisible>1</x:TopRowVisible>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
<x:ActiveRow>15</x:ActiveRow>
<x:ActiveCol>4</x:ActiveCol>
</x:Pane>
</x:Panes>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>11250</x:WindowHeight>
<x:WindowWidth>18180</x:WindowWidth>
<x:WindowTopX>480</x:WindowTopX>
<x:WindowTopY>60</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
<x:ExcelName>
<x:Name>Print_Area</x:Name>
<x:SheetIndex>1</x:SheetIndex>
<x:Formula>=ステップ別課題一覧表abcd!$B$2:$I$41</x:Formula>
</x:ExcelName>
</xml><![endif]-->