<?php
function Export(){
set_time_limit(0);
ob_start();
$biz = new ZaikuBiz();
$biz->setSearch($_POST);
$list = $biz->loadAll();
$this->setVar('list', $list);
$this->setVar('ExpandedRowCount', count($list)+1);
$this->startDownload('在库_'.date('Ymd').'.xls');
echo "<?xml version=\"1.0\"?>\r\n";
echo "<?mso-application progid=\"Excel.Sheet\"?>\r\n";
$this->loadFile('Zaiku/Export');
}
?>
<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>Windows 用户</Author>
<LastAuthor>Windows 用户</LastAuthor>
<Created>2017-03-15T04:33:02Z</Created>
<LastSaved>2017-03-15T04:34:31Z</LastSaved>
<Version>12.00</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>5970</WindowHeight>
<WindowWidth>15015</WindowWidth>
<WindowTopX>480</WindowTopX>
<WindowTopY>60</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Center"/>
<Borders/>
<Font ss:FontName="宋体" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="{ExpandedRowCount}" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="13.5">
<Row>
<Cell><Data ss:Type="String">规格型号</Data></Cell>
<Cell><Data ss:Type="String">产品编号</Data></Cell>
<Cell><Data ss:Type="String">描述</Data></Cell>
<Cell><Data ss:Type="String">入库数量</Data></Cell>
<Cell><Data ss:Type="String">出库数量</Data></Cell>
<Cell><Data ss:Type="String">当前在库</Data></Cell>
</Row>
<tpl:loop name="list">
<Row>
<Cell><Data ss:Type="String">{spec}</Data></Cell>
<Cell><Data ss:Type="String">{no}</Data></Cell>
<Cell><Data ss:Type="String">{desc}</Data></Cell>
<Cell><Data ss:Type="Number">{in_number}</Data></Cell>
<Cell><Data ss:Type="Number">{out_number}</Data></Cell>
<Cell><Data ss:Type="Number">{stock_number}</Data></Cell>
</Row>
</tpl:loop>
</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>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>4</ActiveRow>
<ActiveCol>5</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>

PHP导出XML格式的EXCEL的更多相关文章

  1. Java导出带格式的Excel数据到Word表格

    前言 在Word中创建报告时,我们经常会遇到这样的情况:我们需要将数据从Excel中复制和粘贴到Word中,这样读者就可以直接在Word中浏览数据,而不用打开Excel文档.在本文中,您将学习如何使用 ...

  2. 如何通过Java导出带格式的 Excel 数据到 Word 表格

    在Word中制作报表时,我们经常需要将Excel中的数据复制粘贴到Word中,这样则可以直接在Word文档中查看数据而无需打开另一个Excel文件.但是如果表格比较长,内容就会存在一定程度的丢失,无法 ...

  3. C#将数据以XML格式写入Excel

    本文转载:http://www.cnblogs.com/eflylab/archive/2008/09/21/1295580.html c#将数据导入Excel另类方法 今天公司突然给个Excel模版 ...

  4. POI导出带格式的Excel模板——(六)

    Jar包

  5. c# 导出2007格式的Excel的连接字符串

    上次做了个导出excel文件的客户端软件,没有注意到:当打开2007版的excel时提示错误“外部表不是预期的格式”,刚才网上荡了点资料,改了一下连接字符串,问题解决了: 把:string strCo ...

  6. C#导出带有格式的Excel(列宽,合并单元格,显示边框线,加背景颜色等)

    源地址:http://blog.sina.com.cn/s/blog_74f702e60101au55.html 导出excel相关设置:http://blog.csdn.net/wanmingtom ...

  7. C#导出.csv格式的excel表

    .cs文件直接贴代码: using System; using System.Collections.Generic; using System.Data; using System.IO; usin ...

  8. mac中导出CSV格式在excel中乱码

    1 - 首先需要查看文档的编码格式: 安装enca:  brew install enca 使用命令 enca  file路径即可查到文件的编码格式 Universal transformation ...

  9. asp.net mvc用aspose.cells 导出xlsx格式的excel。无残留

    public void Export() { HttpResponse Response = System.Web.HttpContext.Current.Response; // Load your ...

随机推荐

  1. spring boot eclipse 远程调试

    <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot ...

  2. Devops(三):Docker常用命令

    列出镜像列表(docker images) [root@master docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello ...

  3. Java多个线程顺序打印数字

    要求 启动N个线程, 这N个线程要不间断按顺序打印数字1-N. 将问题简化为3个线程无限循环打印1到3 方法一: 使用synchronized 三个线程无序竞争同步锁, 如果遇上的是自己的数字, 就打 ...

  4. Tomcat Response encode

    Character Encoding - Apache Tomcat - Apache Software Foundation https://cwiki.apache.org/confluence/ ...

  5. 用SC命令 添加或删除windows服务提示OpenSCManager 失败5

    在安装命令行中安装  windowsOpenSCManager 失败5  的错误,原因是当前用户的权限不足,需要做的是在注册表 HKEY_LOCAL_MACHINE\Software\Microsof ...

  6. meta name="location" 标签的使用

    在进行一些操作的时候,我们可能会用到这个标签来什么,地理位置,不错的网站优化标签. <meta name="location" content="province= ...

  7. Spring 整合 myBatis

    思路 数据库连接池交给 Spring 管理 SqlSessionFactory 交给 Spring 管理 从 Spring 容器中直接获得 mapper 的代理对象 步骤 创建工程 导入 jar 创建 ...

  8. ISO/IEC 9899:2011 条款6.10——预处理指示符

    6.10 预处理指示符 语法 1.preprocessing-file: groupopt group: group-part group    group-part group-part: if-s ...

  9. django项目mysite 2

    一.表单form 为了接收用户的投票选择,我们需要在前端页面显示一个投票界面 polls/detail.html <h1>{{ question.question_text }}</ ...

  10. 如何用谷歌浏览器导出一个https网站的数字证书

    HTTPS加密是互联网安全建设的基础,百度.淘宝.天猫等越来越多互联网巨头启用全站HTTPS,也带动了更多网站加入HTTPS加密的行列.普通用户也逐渐明白HTTPS比HTTP更安全,访问网银.购物等重 ...