JS 最简单的XML格式Excel表格文件

简介: JS 最简单的XML格式Excel表格文件
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<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">
  <Worksheet ss:Name="tt">
    <Table>
      <Row>
        <Cell><Data ss:Type="String">Hello!World!</Data></Cell>
        <Cell><Data ss:Type="Number">123</Data></Cell>
      </Row>
    </Table>
  </Worksheet>
</Workbook>
  • 注意 ss:Type=“String” 里面的类型需要首字母大写。


  • 复杂写法,需要包含字体,字号,颜色…
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<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">
    <Title>Excel表格</Title>
    <LastAuthor>bigtall</LastAuthor>
  </DocumentProperties>
  <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
      <Alignment ss:Vertical="Center"/>
      <Font ss:FontName="宋体" x:CharSet="134" ss:Size="12"/>
    </Style>
  </Styles>
  <Worksheet ss:Name="tt">
    <Table>
      <Row>
        <Cell ss:MergeAcross="6" ><Data ss:Type="String">Hello!World!</Data></Cell>
      </Row>
    </Table>
  </Worksheet>
</Workbook>
相关文章
|
10天前
|
XML 数据格式
小米备份descript.xml文件
小米备份descript.xml文件
13 0
|
22天前
|
XML Java 数据库连接
mybatis中在xml文件中通用查询结果列如何使用
mybatis中在xml文件中通用查询结果列如何使用
20 0
|
24天前
|
XML JavaScript 前端开发
xml文件使用及解析
xml文件使用及解析
|
2月前
|
XML 关系型数据库 MySQL
【Mysql】有关数据库中一对多/一对一,多对一xml中文件映射问题
【Mysql】有关数据库中一对多/一对一,多对一xml中文件映射问题
12 0
|
2月前
|
XML C# 数据格式
使用C#操作XML文件
使用C#操作XML文件
12 0
|
2月前
|
Java
java实现遍历树形菜单方法——映射文件VoteTree.hbm.xml
java实现遍历树形菜单方法——映射文件VoteTree.hbm.xml
11 0
|
2月前
|
Kubernetes Cloud Native Java
Activiti 简介以及最新activiti依赖 pom.xml文件(使用时注意对应版本号)
Activiti 简介以及最新activiti依赖 pom.xml文件(使用时注意对应版本号)
40 2
|
2月前
|
XML Java 数据库连接
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
12 0
|
7天前
|
JavaScript 前端开发 BI
原生html—摆脱ps、excel 在线绘制财务表格加水印(html绘制表格js加水印)
原生html—摆脱ps、excel 在线绘制财务表格加水印(html绘制表格js加水印)
11 1
|
13天前
|
XML C# 数据格式
C# 解析XML文件
C# 解析XML文件
19 1