android 实现excel的导出,没有报错,但在目标文件下,找不到应该导出的表

//导出
private void exportDataToExcel() {
ExportThread eThread = new ExportThread(this, excelFileName, new OnExcelReadWriteSuccess() {
@Override
public void onError(Exception e) {

        }
        @Override
        public void onReadSuccess(ArrayList<SmsData> readList) {

        }
        @Override
        public void onWriteSuccess() {
            String exportpath=Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+"tongxunlu.xls";
            try{
                WritableWorkbook wb= Workbook.createWorkbook(new File(exportpath));
                WritableSheet ws=wb.createSheet("sheet",0);
                Label label=new Label(0,0,"name");
                Label label2=new Label(1,0,"phone");
                Label label3=new Label(2,0,"msg");
                Label label4=new Label(3,0,"issend");
                ws.addCell(label);
                ws.addCell(label2);
                ws.addCell(label3);
                ws.addCell(label4);
                for(int i=1;i<lists.size()+1;i++){
                    ws.addCell(new Label(
                            0,i,lists.get(i-1).getName()));
                    ws.addCell(new Label(1,i,lists.get(i-1).getPhone()));
                    ws.addCell(new Label(2,i,lists.get(i-1).getSms()));
                    if(lists.get(i-1).isSent()){
                        ws.addCell(new Label(3,i,"1"));
                    }else {
                        ws.addCell(new Label(3,i,"0"));
                    }
                }
                wb.write();
                wb.close();
                Toast.makeText(MainActivity.this,"导出成功"+exportpath,Toast.LENGTH_SHORT).show();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }


    });

}

1个回答

调试输出下
String exportpath=Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+"tongxunlu.xls";
这个路径对不对

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android导出EXCEL表
轻松实现Android导出EXCEL表
JAVA实现导出Excel表
用java完成将数据导出到Excel中的功能,首先去了解一下有哪些Java ExcelAPI。 Java Aspose Cells         Java Aspose Cells 是一种纯粹的Java授权的Excel API,开发和供应商Aspose发布。这个API的最新版本是8.1.2,发布于2014年7月,是一个丰富而厚重的API(普通Java类和AWT类的组合)设计,可以读、写和
java实现导出excel表
java实现导出excel表
Java 实现导出excel表
/** * 导出 * 使用方法生成excle模板样式 */ @RequestMapping(value = "/export", method = RequestMethod.GET, produces = "application/json") public void aud001Export(HttpServletRequest request,
求助:导出EXCEL时报错,找不到ISAM!
VB版块的兄弟姐妹,呵呵,我来问个小问题,程序运行后导出EXCEL文件时报错:找不到ISAM,但程序另外的机器上是可以正常导出的,请问这个问题如何解决呢?谢谢大家了!!!
jsp导出excel报错
我写在action里边的 木有写在jsp里边 现在功能能实现 但是后台报错 package com.dzcc.action;rnrnimport java.io.OutputStream;rnimport java.util.*;rnrnimport javax.annotation.Resource;rnimport javax.servlet.http.HttpServletResponse;rnimport javax.servlet.jsp.JspWriter;rnimport javax.servlet.jsp.PageContext;rnrnimport org.apache.poi.hssf.usermodel.HSSFCell;rnimport org.apache.poi.hssf.usermodel.HSSFCellStyle;rnimport org.apache.poi.hssf.usermodel.HSSFRow;rnimport org.apache.poi.hssf.usermodel.HSSFSheet;rnimport org.apache.poi.hssf.usermodel.HSSFWorkbook;rnimport org.apache.struts2.ServletActionContext;rnimport org.springframework.context.annotation.Scope;rnimport com.dzcc.entity.Roles;rnimport com.dzcc.service.IqueryUserService;rnimport com.opensymphony.xwork2.ActionSupport;rnrn@Scope("prototype")rnpublic class ExcelUtilsAction extends ActionSupport rn private List listuser;rn private IqueryUserService userService;rnrn public IqueryUserService getUserService() rn return userService;rn rnrn @Resource(name = "IqueryUserService")rn public void setUserService(IqueryUserService userService) rn this.userService = userService;rn rnrn public List getListuser() rn return listuser;rn rnrn public void setListuser(List listuser) rn this.listuser = listuser;rn rnrn public String createExcel() rn try rn PageContext page = null;rn JspWriter out = page.getOut();rn this.listuser = this.userService.getAllUsers();rn HttpServletResponse response = ServletActionContext.getResponse();rn OutputStream os = response.getOutputStream();rn response.reset();rn out.clear();rn out = page.pushBody();rn response.setContentType("application/msexcel;charset=gbk"); // 设置响应格式rnrn // 设置响应头,即报表头rn response.setHeader("Content-disposition", "attachment;filename="rn + new String("账户统计报表".getBytes(), "iso-8859-1") + ".xls");rnrn HSSFWorkbook hwb = new HSSFWorkbook();rn HSSFSheet sheet = hwb.createSheet("new Sheet");rn hwb.setSheetName(0, "账户统计报表");rnrn HSSFRow row = sheet.createRow((short) 0);rn sheet.createFreezePane(0, 1);// 设置第一行显示内容rn createCell(hwb, row, (short) 0, "角色名称");rn createCell(hwb, row, (short) 1, "用户名称");rnrn for (int i = 0; i < listuser.size(); i++) rn HSSFRow row1 = sheet.createRow((short) i);rn Roles roles = (Roles) listuser.get(i);rn for (int j = 0; j < 2; j++) rn if (j == 0) rn createCell(hwb, row1, (short) j, roles.getRolename());rn else rn createCell(hwb, row1, (short) j, roles.getRolename());rn rn rn rn hwb.write(os);rn rn os.close();rn catch (Exception e) rn e.printStackTrace();rn rn return "createSuccess";rn rnrn public void createCell(HSSFWorkbook wb, HSSFRow row, short col, String val) rn HSSFCell cell = row.createCell(col);rn cell.setCellValue(val);rn HSSFCellStyle cellStyle = wb.createCellStyle();rn cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER_SELECTION);rn cell.setCellStyle(cellStyle);rn rnrn错误信息:java.lang.IllegalStateException: getOutputStream() has already been called for this responsernrn我上网搜了一下 说是 输出流的方法冲突 我试图改了一下 还是不能解决 一天了 很着急 希望大家帮帮忙
导出excel报错??
导出excel总是提示"microsoft Excel 不能访问文件"http://10.0.0.160/ga/Excelsheet.asp" .可能原因有:rn *指定的文档名称或路径不存在。rn *所要打开的文档被其他程序占用,切换到相应程序,关闭文档再试。rn *所要保存的工作簿的名称与一个只读文档同名,请用其他名称保存文档。rnrnrn代码如下,rnrn<%rn'on error resume nextrnResponse.ContentType="application/vnd.ms-excel"rnrndim cnt,sql,rs,min_time,max_time,sp_sql,I,sp_strrnset conn=application("conn")rnrnsql=session("Errsql")rnset rs=Server.CreateObject("ADODB.Recordset")rnrs.open sql,conn,3,1rnif rs.recordcount<>0 thenrnrnrs.movelastrn max_time=rs("ErrorTime")rnrs.movefirstrn min_time=rs("ErrorTime")rncnt=Rs.Recordcountrnrn%>rnrnrn rn rnrnrn rn rn rn rn rn (<%=min_time%>) 至 (<%=max_time%>) 报警信息统计分析rn rn rn 行号rn 所属区域rn 设备IPrn Mac地址rn 报警类型rn 起始时间rn 结束时间rn 上网时段(分)rn 报警时间rn rn <%rnFor I=1 to rs.RecordcountrnArrErrMsg=ErrMsgPartStr(Rs("ErrorMsg"))rn%>rn rn <%=I%>rn rn <%if rs("ClassID")<>"" thenrn response.write rs("ClassName")rn elsern response.write "——"rn end if%>rn rn <%=rs("IPAddres")%>rn <%=rs("MacAddress")%>rn rn rn <%if rs("ErrorMsg")<>"" thenrn if inStr(rs("ErrorMsg"),"曾经上过网")<>0 thenrn Response.write Mid(rs("ErrorMsg"),6,5)rn elseif inStr(rs("ErrorMsg"),"现在正在上网")<>0 thenrn Response.write Mid(rs("ErrorMsg"),6,6)rn elsern Response.write Mid(rs("ErrorMsg"),6,7)rn end ifrn elsern Response.write "--" rn end if%>rn rn <%if ArrErrMsg(1)<>"" then%>rn <%=ArrErrMsg(1)%> rn <%else%>rn -- rn <%end if%>rn <%if ArrErrMsg(2)<>"" then%>rn <%=ArrErrMsg(2)%> rn <%else%>rn -- rn <%end if%>rn <%if ArrErrMsg(3)<>"" then%>rn <%=ArrErrMsg(3)%> rn <%else%>rn -- rn <%end if%>rn <%=rs("ErrorTime")%>rn rn <%rn rs.movenextrnnextrn%>rn rn 合计rn <%=cnt%>rn 制表时间rn <%=Now()%>rn 制表人rn rn rnrn<%rnend ifrnrs.closernset rs=nothingrn%>rnrnrnrn
POI导出Excel报错
项目用的POI版本是3.14,本地和开发服务器导出Excel都没有问题,就是上测试环境的时候老是报错,报错信息如下:rn[code=java]rn 服务器错误,org/apache/poi/ss/usermodel/CellStyle.setBorderBottom(Lorg/apache/poi/ss/usermodel/BorderStyle;)V (loaded from file:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/poi-3.13.jar by com.ibm.ws.classloader.CompoundClassLoader@f35aa8c9[war:oms2-app--0_1-SNAPSHOT/oms2-app--0.1-SNAPSHOT.war] Local ClassPath: /usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/json-smart-2.2.1.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/SyncClientAPI-release.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-mlog-techmgmt-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-wf-intf-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-boot-starter-websocket-1.5.4.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/hamcrest-core-1.3.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/httpclient-4.5.2.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/quartz-2.2.3.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-boot-starter-freemarker-1.5.4.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-websocket-4.3.9.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-rtoc-managent-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/httpcore-4.4.5.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-drill-transfer-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-qual-help-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/httpcore-nio-4.4.5.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-boot-starter-test-1.5.4.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/httpmime-4.5.3.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/ezmorph-1.0.6.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-context-support-4.3.9.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-qual-apply-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/cxf-rt-frontend-simple-3.2.4.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/javacsv-2.0.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-qual-cnpcaudit-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/cxf-rt-bindings-soap-3.2.4.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/android-json-0.0.20131108.vaadin1.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/batik-css-1.7.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/thumbnailator-0.4.8.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/jackson-annotations-2.8.0.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/cxf-core-3.2.4.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/assertj-core-2.6.0.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/commons-collections-3.2.2.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-test-4.3.9.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/report4-2018.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/spring-context-4.3.9.RELEASE.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/log4j-core-2.7.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/junit-4.12.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/fontbox-1.8.10.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/rtdbConnNew-release.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/pinyin4j-2.5.0.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-drill-report-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-log-operation-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/batik-svggen-1.7.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/cxf-rt-frontend-jaxws-3.2.4.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/jdom-1.1.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/poi-ooxml-3.13.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/rtstorage-release.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/wsdl4j-1.6.3.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/stax-api-1.0.1.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/oms2-drill-engineering-0.1-SNAPSHOT.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/aspectjweaver-1.8.10.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/ehcache-2.10.4.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Node01Cell/oms2-app--0_1-SNAPSHOT.ear/oms2-app--0.1-SNAPSHOT.war/WEB-INF/lib/dm-2018.jar:/usr/IBM/WebSphere/AppServer/profiles/WebApp01/installedApps/A7V2CSXXAPP01Nrn[/code]
水晶报表导出excel报错
DiskFileDestinationOptions diskOpt = new DiskFileDestinationOptions();rn FaultCountCR fcr = new FaultCountCR();rn fcr.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;rnrn fcr.ExportOptions.ExportFormatType = ExportFormatType.Excel;rn diskOpt.DiskFileName = "C:\\Inetpub\\wwwroot\\MonitorSystem\\demo.xls";rnrn fcr.ExportOptions.DestinationOptions = diskOpt;rnrn fcr.Export();rnrn以上是导出代码rnrn错误信息:rnLogon failed. Details: ADO Error Code: 0x80040e73 Source: Microsoft OLE DB Service Components Description: 指定的初始化字符串不符合 OLE DB 规定。 Error in File C:\DOCUME~1\DINGCH~1\ASPNET\LOCALS~1\Temp\7739BB97-67C7-4268-A33C-50290E519C4E.rpt: Unable to connect: incorrect log on parameters.rnrnrn请高手求救rnrn
导出Excel报错问题
问题描述:Office已经验证,其他软件导出正常,唯独这一个有问题,而且以前正常,现在有问题。具体错误为:Microsoft Office 无法验证此产品的许可证。应使用控制面板修复Office程序。【见下图】 解决方案:exe的兼容模式去掉!O(∩_∩)O哈哈~  千万别卸载重装,没用!
php excel 导出报错
php版本7.1.12 使用yii2的  &quot;moonlandsoft/yii2-phpexcel&quot;: &quot;*&quot; 扩展 在本地没有问题,到测试环境点击导出会提示:无法访问此网页,已永久性地移动到了新网址 网上找了很久没有一个方法可以 后修改   使用excel版本好了 修改文件:vendor/moonlandsoft/yii2-phpexcel/Excel.php  565行    把Ex...
C#winform导出excel报错
[b]无法将类型为“Microsoft.Office.Interop.Excel.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Excel._Application”。此操作失败的原因是对 IID 为“000208D5-0000-0000-C000-000000000046”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 加载类型库/DLL 时出错。 (异常来自 HRESULT:0x80029C4A (TYPE_E_CANTLOADLIBRARY))[/b]rn查了下,这个异常很诡异,解决办法有的是删注册表,有的是EXCEL几个版本来回装,有的是卸载WPS。但是应用是面向用户的,总不能希望用户也能去操作注册表或者各种来回卸载重装吧?rn想问问各位,还能有什么好的办法么?
导出excel报错
asp.net在 vs中导出excel正常,但是在iis中报错rnrn按网上方法试了下,只在web.config中配置才能正常访问,但是不想用这种方式,有没有其他途径
导出Excel报错
有时可以导出,有时报一下错误,这是为啥??rn错误地址:rn错误时间:2013/2/19 11:07:25rn所在IP:rn错误信息:检索 COM 类工厂中 CLSID 为 00024500-0000-0000-C000-000000000046 的组件时失败,原因是出现以下错误: 8000401a。rn错误详细:System.Runtime.InteropServices.COMException (0x8000401A): 检索 COM 类工厂中 CLSID 为 00024500-0000-0000-C000-000000000046 的组件时失败,原因是出现以下错误: 8000401a。rn 在 System.Web.UI.WebControls.Button.OnClick(EventArgs e)rn 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)rn 在 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)rn 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)rn 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)rn 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)rn----------------------------------------------------------rnrnrnrn导出Excel 方法rn /// rn /// 导出Excel rn /// rn /// rn public static void ExportCMB(System.Data.DataTable dtTemp, string ServerPath, string TextName, System.Web.UI.Page page)rn rn // 定义要使用的Excel 组件接口rn // 定义Application 对象,此对象表示整个Excel 程序rn Application excelApp = null;rn // 定义Workbook对象,此对象代表工作薄rn Workbook workBook;rn // 定义Worksheet 对象,此对象表示Execel 中的一张工作表rn Worksheet ws = null;rn //定义Range对象,此对象代表单元格区域rn Range range;rnrn int dcell = 1;rn int colindex = 0;rnrn int rowcount = dtTemp.Rows.Count;rn int colcount = dtTemp.Columns.Count;rnrn tryrn rn //初始化 Application 对象 excelApprn excelApp = new Application();rn //在工作薄的第一个工作表上创建任务列表rn workBook = excelApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);rn ws = (Worksheet)workBook.Worksheets[1];rnrn // 命名工作表的名称为rn ws.Name = "Sheet1";rn //创建缓存rn Object[,] objdata = new object[rowcount + 3, colcount];rnrn //创建标题rn foreach (System.Data.DataColumn dc in dtTemp.Columns)rn rn objdata[0, colindex++] = dc.ColumnName;rn rnrn //获取数据rn for (int i = 0; i < rowcount; i++)rn rn dcell = 0;rnrn for (int j = 0; j < colcount; j++)rn rn objdata[i + 1, dcell++] = dtTemp.Rows[i][dtTemp.Columns[j].ColumnName].ToString();rn rn rn //写入Excelrn range = ws.get_Range(excelApp.Cells[1, 1], excelApp.Cells[rowcount + 1, colcount]);rn ws.get_Range(excelApp.Cells[2, 12], excelApp.Cells[rowcount + 1, 12]).NumberFormatLocal = "@";rnrn range.Value2 = objdata;rn range.Font.Size = 10;rnrnrn //设置格式rn excelApp.Cells.HorizontalAlignment = Constants.xlLeft; //全局左对齐rn excelApp.Cells.EntireColumn.AutoFit();rn range = ws.get_Range(excelApp.Cells[1, 1], excelApp.Cells[rowcount + 1, colcount]);rnrn range.Borders.LineStyle = 1;rn //显示 Excelrnrn workBook.SaveCopyAs(ServerPath.Replace("//", "\\") + TextName + ".xlsx");rnrn workBook.Close(false, null, null);rn excelApp.Quit();rn ws = null;rn Utility.UploadExcel(ServerPath.Replace("//", "\\") + TextName + ".xlsx", page, true);rn rn catch (Exception ex)rn rn excelApp.Quit();rn throw ex;rn rn
导出excel表
各种形式 的 导出excel表格 内含工具类代码(支持的个是比较齐全)
asp.net。导出excel表
asp.net里导出excel表方法汇总,各种方法,路径
JAVA导出Excel表
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
【机房收费系统】---导出Excel表
一、背景 机房收费系统中有很多地方用到了“导出Excel表”这个功能,话不多说,怎么导出呢? 二、导出Excel表 1、电脑安装office 2、引用:工程---属性---
Struts1.2导出Excel表
Struts1.2导出Excel表完美版
GridView导出excel表
GridView导出Excel 111111111111111111111111111
sql导出Excel表
数据库中有一张表,我想导出 一张空表到Excel中,Excel中只显示该表中的字段,数据不用导出rn导出的效果是这样的:rna1 a2 a3 a4rn我想导出一张只有字段的空表,这样别人可以在这个空表中填数据,然后我可以把这张表中的数据再导入到数据库中。
asp.net 导出excel表
点击导出excel按钮后,前台页面找不到,并且后台出现"sql附近有错误”,一开始以为是sql语句写错,但是把sql语句复制到数据库中是可以运行并且查出数据的,哪位大神帮忙解决一下,在线等[img=https://img-bbs.csdn.net/upload/201704/24/1493026800_783931.png][/img][img=https://img-bbs.csdn.net/upload/201704/24/1493026686_469469.png][/img]
导出Excel表的问题
有一个字段是身份证号码,在导出Excel表时,老是用科学技术法表示,把列拉长也不能变回原样。但是,放到第一列,把列拉长就可以恢复成身份证号码。请问怎么解决这个问题?
机房收费系统—导出Excel表
学习机房学到的其中一个新的知识点就是导出Excel表,这个知识点是以前没有接触过的。也许是因为在机房这里接触到的新的知识多了,也许是因为自己对导出Excel比较感兴趣,所以当遇到这个知识点的时候,自己不向以前那样,再看到新的知识紧张甚至恐惧了。感觉进步很大,继续加油。 导出Excel表
网页导出excel表
利用简单的javascript从页面上导出excel表格
Excel表的生成和导出
如何使用java生成一个Excel 如何使用java导出一个Excel方便大家 共同学习
EXCEl表导出问题
我的程序在编译时,可以将Jtable里的数据导入到EXCLE中,可是在生成.jar文件后就不能将Jtable里的数据导成EXCEL,请问怎么能解决这个问题。
导出excel表问题
[code=C#]rnprotected void Button1_Click(object sender, EventArgs e)rn rn string sqlstr = "select * from fault";rn ds = d.GetData(sqlstr, "excel");//获取数据放到excel表上,已验证ds.Tables["excel"]已有数据rnrn int ItenCountPerSheet = 500;rn int SheetCount = Convert.ToInt32(Math.Ceiling((double)ds.Tables["excel"].Rows.Count / ItenCountPerSheet));rn Response.ClearContent();rn Response.BufferOutput = true;rn Response.Charset = "utf-8";rn Response.ContentType = "application/ms-excel";rn Response.AddHeader("Content-Transfer-Encoding", "binary");rn Response.ContentEncoding = System.Text.Encoding.UTF8;rn Response.AppendHeader("Content-Disposition", "attachment;filename=" + Server.UrlEncode("Excel表格测试") + ".xml");rn //Response.AppendHeader("Content-Disposition", "attachment;filename="+Server.UrlEncode("孟宪会Excel表格测试")+".xls");rn // 采用下面的格式,将兼容 Excel 2003,Excel 2007, Excel 2010。rnrn String FileName = "Excel表格测试";rn if (!String.IsNullOrEmpty(Request.UserAgent))rn rn // firefox 里面文件名无需编码。rn if (!(Request.UserAgent.IndexOf("Firefox") > -1 && Request.UserAgent.IndexOf("Gecko") > -1))rn rn FileName = Server.UrlEncode(FileName);rn rn rn Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName + ".xml");rn Response.Write("");rn Response.Write(@"");rn Response.Write(@"");rn Response.Write(@"孟宪会孟子E章rn 2010-09-08T14:07:11Zmxh1990");rn Response.Write("");rn Response.Write(@" ");rn //定义标题样式 rn Response.Write(@" ");rnrn //定义边框rn Response.Write(@" ");rnrn Response.Write("");rnrn //SheetCount代表生成的 Sheet 数目。rn for (int i = 0; i < SheetCount; i++)rn rn //计算该 Sheet 中的数据起始行和结束行。rn int start = ItenCountPerSheet * i;rn int end = ItenCountPerSheet * (i + 1);rn if (end > ds.Tables["excel"].Rows.Count) end = ds.Tables["excel"].Rows.Count;rnrn Response.Write("");rn Response.Write("");rn for (int j = 0; j < ds.Tables["excel"].Columns.Count; j++)rn rn Response.Write("" + ds.Tables["excel"].Columns[j].ColumnName + "");rn rn Response.Write("\r\n");rnrnrn for (int j = start; j < end; j++)rn rn Response.Write("");rn for (int c = 0; c < 6; c++)rn rn //对于数字,采用Number数字类型rn if (c > 1)rn rn Response.Write("" + ds.Tables["excel"].Rows[j][c].ToString() + "");rn rn elsern rn Response.Write("" + ds.Tables["excel"].Rows[j][c].ToString() + "");rn rn rn Response.Write("");rn rn Response.Write(" ");rnrn //输出标题rn Response.Write("\r\n");rn Response.Write("");rn Response.Flush();rn rn Response.Write("");rn Response.End();rn[/code]rnrn以上代码是参考孟子E章的代码,它的代码是用datatable的,我改了用datasetrn地址:http://dotnet.aspx.cc/article/e9e795ab-8fb5-47e8-a586-2c943a8e5408/read.aspxrnrn运行没有出错,能导出一个xml文件,改为xls后打开,弹出“加载期间出现问题”的框rnrn框的内容:rn加载期间在下述区域中出现了问题(P):rn表格rnrnrnrn由于错误,此文件无法打开。错误列于:http://dotnet.aspx.cc/article/e9e795ab-8fb5-47e8-a586-2c943a8e5408/read.aspxrnrnrnrnrn求帮忙看看是怎么回事??谢谢了!!!
导出EXCEL表问题
Public Function myInsert()rnDim d As Longrn d = Format(Date, "yyyymmdd")rnrn DoCmd.TransferSpreadsheet acExport, 5, "新客户", "D:\" & d & "新客户.xls", False, "" '向原有表格插入數據rnrnEnd Functionrnrn我用这个代码导出EXCEL表,想给导出的'新客户.xls'里的工作表命名为'新表',请问应该怎么写代码呀?
excel表导出问题
Protected Sub btndload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btndload.Clickrn Response.Clear()rn Response.Buffer = Truern Response.Charset = "GB2312"rn Response.AppendHeader("Content-Disposition", "attachment;filename=FileName.xls")rn Response.ContentEncoding = System.Text.Encoding.UTF7rn Response.ContentType = "application/ms-excel"rn Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriterrn Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)rn GW_view.RenderControl(oHtmlTextWriter)rn Response.Output.Write(oStringWriter.ToString)rn Response.Flush()rn Response.End()rn End Subrn这是一段将gridview导出到excle表的代码,现在有一个问题,就是类似于帐号的字段,例:1234567890123456789 这样的文本格式导入到excel表中就变成了1234567890123456000,请问怎么把数字的文本格式存入到excel表中呢?
导出Excel表的方法
导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法导出Excel表的方法
POI导出Excel表
POI导出Excel我们接触的其实还是比较多的,很多软件都会用到此功能的。这次就细致的来说一下吧。 一、Excel导出基本思路 String AccountID=titleArr[0]; //定义workbook Workbook wb=new HSSFWorkbook(); //创建工作表对象 Sheet sheet = wb.createSheet(); //标题 /
机房收费系统——导出Excel表
前言      机房收费系统进行了很长时间,其中很典型的一个功能就是导出Excel表格,很多窗体都需要实现这个功能。 主要内容       首先需要在VB的“工程”→引用  Microsoft Excel 15.0object library        然后从VB中的MSHFlexGrid中导出数据,代码实现如下: Private Sub cmdoutput_Clic
导出Excel表
首先导入pio包: &amp;lt;!--导excel到数据库  --&amp;gt;         &amp;lt;!-- POI --&amp;gt;             &amp;lt;dependency&amp;gt;                   &amp;lt;groupId&amp;gt;org.apache.poi&amp;lt;/groupId&amp;gt;                   &amp;lt;artifactId&amp;gt;poi-o...
java导出excel表
用java导出一张excel表,一个ExportExcel工具类用来生成excel表,ComplexExportExcelClient报表生成类
如何导出Excel表??????????
请各位帮帮我!!!!
导出信息到excel表
public String exp() throws Exception { try { List documents = new DocumentFacade().find(document); if(documents != null && documents.size() > 0) { WritableCellFormat wcformat = new WritableCellFor
vue导出excel表
方法一:vue2.0 + element UI 中 el-table 数据导出Excel 。https://blog.csdn.net/u010427666/article/details/79208145 方法二: 1.安装2个依赖包(其实是3个)  npm install -S file-saver xlsx npm install -D script-loader 2.在项目中新...
简单的Excel表导出
导入jar包 &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;cn.afterturn&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;easypoi-base&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;3.0.2&amp;lt;/version&amp;gt; &amp;lt;/dependenc
快捷导出 excel 表
//导出excel格式表 public function exportData($filename, $title, $data) { header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=" . $filename . ".xls"...
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表