zoukankan      html  css  js  c++  java
  • Excel 对应.xml/.ftl 配置(中爆导出范文)

    <?xml version="1.0"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    <Author>Microsoft Office 用户</Author>
    <LastAuthor>Microsoft Office 用户</LastAuthor>
    <Created>2018-03-20T11:35:57Z</Created>
    <Version>15.0</Version>
    </DocumentProperties>
    <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
    <AllowPNG/>
    <PixelsPerInch>96</PixelsPerInch>
    </OfficeDocumentSettings>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
    <WindowHeight>14260</WindowHeight>
    <WindowWidth>25600</WindowWidth>
    <WindowTopX>0</WindowTopX>
    <WindowTopY>460</WindowTopY>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
    <Alignment ss:Vertical="Bottom"/>
    <Borders/>
    <Font ss:FontName="宋体" x:CharSet="134" ss:Size="12" ss:Color="#000000"/>
    <Interior/>
    <NumberFormat/>
    <Protection/>
    </Style>
    <Style ss:ID="s62">
    <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
    </Borders>
    </Style>

    <Style ss:ID="s63">
    <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
    </Borders>
    <Font ss:FontName="宋体" x:CharSet="134" ss:Size="16" ss:Color="#000000" ss:Bold="1"/> (设置字体大小,粗细为1)
    </Style>
    </Styles>
    <Worksheet ss:Name="工作表1">
    <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="31" x:FullColumns="1" (ss:ExpandedColumnCount="3"表示最大为3列(超过会报错小了没事)ss:ExpandedRowCount="31" 这个表示最大行数,这个尤为重要否则导出的行数多余这个就会报错)
    x:FullRows="1" ss:DefaultColumnWidth="65" ss:DefaultRowHeight="15">                               
    <Column ss:Index="2" ss:AutoFitWidth="0" ss:Width="136"/>(设置ss:index值列的宽度)
    <Column ss:AutoFitWidth="0" ss:Width="135"/>(没有ss:index代表上面列的下一列)
    <Row ss:AutoFitHeight="0" ss:Height="29">(改变列的字体大小后行高要做相应的调整)
    <Cell ss:StyleID="s63"><PhoneticText(s63的样式为此列用)
    xmlns="urn:schemas-microsoft-com:office:excel">lei x</PhoneticText><Data
    ss:Type="String">类型</Data></Cell>
    <Cell ss:StyleID="s63"><PhoneticText
    xmlns="urn:schemas-microsoft-com:office:excel">shen fen z</PhoneticText><Data
    ss:Type="String">身份证</Data></Cell>
    <Cell ss:StyleID="s63"><PhoneticText
    xmlns="urn:schemas-microsoft-com:office:excel">sheng ri</PhoneticText><Data
    ss:Type="String">生日</Data></Cell>
    </Row>
    <#list classCombinationquery as list>(classCombinationquery 为java 给出的数据集合名称)
    <Row ss:AutoFitHeight="0">
    <Cell ss:StyleID="s62"><Data ss:Type="String">${list.className!''}</Data></Cell>(classNmae 代表数据中具体属性(类似EL表达式))
    <Cell ss:StyleID="s62"><Data ss:Type="String">${list.idcardnumber!''}</Data></Cell>
    <Cell ss:StyleID="s62"><Data ss:Type="String">${list.dateofbirth!''}</Data></Cell>
    </Row>
    </#list>
    </Table>
    <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
    <PageSetup>
    <Header x:Margin="0.3"/>
    <Footer x:Margin="0.3"/>
    <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
    </PageSetup>
    <PageLayoutZoom>0</PageLayoutZoom>
    <Selected/>
    <Panes>
    <Pane>
    <Number>3</Number>
    <RangeSelection>R1C1:R31C3</RangeSelection>
    </Pane>
    </Panes>
    <ProtectObjects>False</ProtectObjects>
    <ProtectScenarios>False</ProtectScenarios>
    </WorksheetOptions>
    </Worksheet>
    </Workbook>

  • 相关阅读:
    AngularJS 学习 (一)Start
    div固定位置,不随滚动条滚动
    两个单例小程序
    java实现人脸识别V3版本开发
    flex>行为和特效 小强斋
    flex>导航 小强斋
    flex>定位和布局 小强斋
    flex>菜单设计 小强斋
    flex>其他交互设计 小强斋
    flex>菜单设计 小强斋
  • 原文地址:https://www.cnblogs.com/mayanze/p/8612188.html
Copyright © 2011-2022 走看看