标签: export-to-excel

将php输出导出为ex​​cel

include_once 'mysqlconn.php';
include_once "functions.php";
$filename = $_GET['par'].".xls";
header("Content-type: application/x-msexcel"); 
header('Content-Disposition: attachment; filename="'.basename($filename).'"'); 
if ($_GET['i'] == "par1") {
  func1();
} else if ($_GET['i'] == "par2") {
  echo "?????????";
  func2();  
} else if ($_GET['i'] == "par3") {  
  echo "?????????";
  func3();  
} 
Run Code Online (Sandbox Code Playgroud)

这是我的export2excel.php文件,func1,2,3在functions.php文件中并生成表输出,除了字符编码以外都很有效.我对我的所有文件使用utf-8编码.第二个,如果上面的语句产生健康的编码输出,但是休息2用我喜欢的字符编码我的输出,如"BÜTÇEİÇİ".土耳其语中的"BÜTÇEİÇİ".

简而言之.相同的文件,相同的编码,相同的数据库但结果不同.

任何的想法?

php character-encoding export-to-excel

2
推荐指数
1
解决办法
1万
查看次数

使用JasperReports修复了Excel中的标题

如何使用JapserReports创建带有固定标头的Excel报告?我的意思是当我滚动Excel文件时,我需要修复标题.

jasper-reports export-to-excel

2
推荐指数
1
解决办法
7277
查看次数

CSV 格式的 Excel 宏

有没有办法以 CSV 文件格式运行 Excel 宏?

我正在使用 csv 模板将文件导出到 CSV,是否可以在 CSV 格式的模板上编写宏。我不能用 XLS 格式。谁可以帮我这个事?

csv excel vba export-to-excel

2
推荐指数
1
解决办法
2万
查看次数

java.lang.NoClassDefFoundError:org.primefaces.component.export.ExporterFactory.getExporterForType中的org/apache/poi/ss/usermodel/RichTextString

我使用了Primefaces在其网页中使用的相同示例代码:

<h:commandLink value="Excel">                     
  <p:dataExporter type="xls" target="dataTable" fileName="boo" pageOnly="true"/>  
</h:commandLink>
Run Code Online (Sandbox Code Playgroud)

但是不起作用.在Internet Explorer浏览器中,提供以下消息:

网页错误的详细信息消息:对方法或属性访问的意外调用.

在Mozilla Firefox中没有任何事情发生过.

可能会发生什么?

datatable jsf export-to-excel data-export primefaces

2
推荐指数
1
解决办法
2万
查看次数

并行写入Excel文件c#

从一段时间以来,我一直在努力将数据从db(存储过程)导出到excel文件.当我处理大量数据(每张大约500k行,不幸的是业务需求)时,我想知道是否有可能对单个工作表执行并行写入.我正在使用EPPlus和OpenXML来写入文件.当我通过网络阅读时,我能够理解用户定义的函数可以并行执行,但我没有找到任何并行写入的东西.任何帮助/建议/提示/等.将不胜感激!

c# parallel-processing openxml export-to-excel epplus

2
推荐指数
1
解决办法
1561
查看次数

Strecel溢出在excel jasper报告中不起作用

我正在尝试XLSX使用jasper报告将报告导出到Excel(格式),但是当文本字段溢出时会出现拉伸问题.当值textfield大于textfield大小时,我只得到空单元格.我试图使用这些参数,但它没有帮助我:

<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
<property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
<property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
Run Code Online (Sandbox Code Playgroud)

这里是参考截图:http: //clip2net.com/s/39cbljj

HTML它看起来不错:

http://c2n.me/39cyhRf

有人知道如何解决这个问题吗?谢谢.

jasper-reports export-to-excel hyphenation

2
推荐指数
1
解决办法
5561
查看次数

SSIS - 无法创建表 Microsoft jet 数据库引擎找不到对象

我正在尝试使用 SSIS 包将 sql 表加载到 excel 文件中。但是,当我将 Excel 连接管理器添加到我的 Excel 目标时,使用“新建”按钮添加 Excel 工作表的名称会引发以下错误。

无法创建表 附加信息 Microsoft Jet 数据库引擎找不到对象“地址”。确保该对象存在并且您正确拼写了其名称和路径名(Microsoft Jet 数据库引擎)

请帮助我。提前致谢

ssis export-to-excel

2
推荐指数
1
解决办法
5172
查看次数

如何将HTML表格导出到Chrome和IE支持的Excel?

在我的MVC项目中,我有一个与Knockout绑定的HTML表.

我正在尝试将表导出到Excel.

我尝试在客户端使用JavaScript:

self.exportToExcel = function () {
    javascript: window.open('data:application/vnd.ms-excel,' + $("#tableToprint").innerHTML());
}
Run Code Online (Sandbox Code Playgroud)

要么:

var tableToExcel = (function () {
var uri = 'data:application/vnd.ms-excel;base64,'
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table cellspacing="0" rules="rows" border="1" style="color:Black;background-color:White;border-color:#CCCCCC;border-width:1px;border-style:None;width:100%;border-collapse:collapse;font-size:9pt;text-align:center;">{table}</table></body></html>'
, base64 = function (s) { return window.btoa(unescape(encodeURIComponent(s))) }
, format = function (s, c) { return s.replace(/{(\w+)}/g, function (m, p) { return c[p]; }) }
return function (table, name) {
    if (!table.nodeType) table = document.getElementById(table)
    var ctx = { worksheet: name …
Run Code Online (Sandbox Code Playgroud)

javascript asp.net-mvc jquery export-to-excel knockout.js

2
推荐指数
2
解决办法
1万
查看次数

如何将表导出为 10000 到 40000 行的 Excel

我正在使用 javascript ( window.location.href= uri + base64(tableData))将 html 表导出为 excel,这对于 1500 行工作正常。因为window.location.href有一些限制字符串长度。但我需要导出 40000 行。

我也尝试过使用锚标签 href。但它也不起作用。

那么我们可以将数据部分分配给window.location.href或有任何替代解决方案吗?

javascript export-to-excel

2
推荐指数
1
解决办法
4640
查看次数

从 jasper 导出时,excel 文件中的列为空

我正在使用碧玉报告 3.7.6。我有一个要导出到 excel 的列表。我可以将列表导出到 excel 中,但是我的 excel 中出现了许多隐藏的列和行。如何删除这些隐藏的列和行?

我的代码是这样的:

JasperPrint jasperPrint;  

 JRBeanCollectionDataSource beanCollectionDataSource=new JRBeanCollectionDataSource(lstScoreSheet);  
 String  reportPath=  FacesContext.getCurrentInstance().getExternalContext().getRealPath("/reports/[![enter image description here][1]][1]ScoreSheet.jasper");       

    jasperPrint=JasperFillManager.fillReport(reportPath, getParameters(batchYr),beanCollectionDataSource);
     HttpServletResponse httpServletResponse1=(HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();  
      httpServletResponse1.addHeader("Content-disposition", "attachment; filename=report.xls");  
       ServletOutputStream servletOutputStream=httpServletResponse1.getOutputStream();  

       JExcelApiExporter exporterXLS = new JExcelApiExporter();
       exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint);
       exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, servletOutputStream);
       exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
       exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
       exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
       exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
       exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
       exporterXLS.exportReport();
Run Code Online (Sandbox Code Playgroud)

excel文件图片: 在此处输入图片说明

这里的列 A、C、E.... 都是空的和隐藏的。我想删除那些隐藏的列。

我的 jrxml 代码是:

    <?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ScoreSheet" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
    <property name="ireport.zoom" value="3.897434200000008"/>
    <property name="ireport.x" value="2104"/>
    <property …
Run Code Online (Sandbox Code Playgroud)

jasper-reports export-to-excel

2
推荐指数
1
解决办法
4062
查看次数