spreadsheet

解决Java POI导出海量Excel数据内存溢出

核能气质少年 提交于 2020-04-06 17:00:56
使用POI导出Excel数据的时候有两个方法可以创建WorkBook: HSSFWorkbook:是操作Excel2003以前(包括2003)的版本,扩展名是.xls XSSFWorkbook:是操作Excel2007的版本,扩展名是.xlsx 当数据量超出65536条后,在使用HSSFWorkbook或XSSFWorkbook,程序会报 OutOfMemoryError:Javaheap space 内存溢出错误。 从POI 3.8版本开始,提供了一种基于XSSF的低内存占用的API,也就是SXSSFWorkbook。 SXSSFWorkbook-来至官方的解释:实现“BigGridDemo”策略的流式XSSFWorkbook版本。这允许写入非常大的文件而不会耗尽内存,因为任何时候只有可配置的行部分被保存在内存中。您可以提供用作书面数据基础的模板工作簿。有关详细信息,请参见https://poi.apache.org/spreadsheet/how-to.html#sxssf 请注意,仍然可能会消耗大量内存,这些内存基于您正在使用的功能,例如合并区域,注释......仍然只存储在内存中,因此如果广泛使用,可能需要大量内存。SXSSFWorkbook默认使用 内联字符串而不是共享字符串表 。这非常有效,因为没有文档内容需要保存在内存中,但也被称为制作与某些客户不兼容的文档

使用excel快速建立orCAD器件原理图封装

喜你入骨 提交于 2020-03-19 12:40:03
3 月,跳不动了?>>> 立题详解: 本次讨论使用excel快速建立多引脚器件原理图封装,对硬件设计而言,若是比作修建房屋,那么“器件库”就是“砖头”,“砖头的质量”、“砖头的种类”、“砖头的储备”很大程度上决定了你的工作效率; AD下为: orCAD下为: PADS下为: 对“普通元器件”而言,使用“AD”、“PADS”或是“orCAD”基本看不出差异,譬如对阻容器件而言,三者截图如下: 如上所示,由于器件引脚数少、核对简单等因素,软件本身对效率的影响就微乎其微; 但从目前而言: “电子电路”的集成度越来越高,所用芯片的引脚数也成倍增加,尤其是对高集成对MCU、ARM芯片、FPGA/CPLD、DSP等,其引脚数目很多都已经达到100+,176Pin的STM32芯片也已经不是稀有物品;此时,若是想完全依赖手工制作“IC原理图库”,难度很大; 1、使用方法 如上图本次, 使用方法为: “orCAD”下制作“库文件”下的“New Part from SpreadSheet”进行快速制作;辅助工具为“excel 2013”; 如“EPM240T100C5”,其为“CPLD芯片”,引脚数为“100PIN”,绘制库时,将其切割为“5个PART”,如下所示: 如上所示,若是使用AD绘制,则需逐个核对,并对“每个PIN脚”进行独立设置;工程量很大,而且后期核对的难度也较大; 2、优化方案 使用

Is there a way to create a spreadsheet like editable grid on flutter?

a 夏天 提交于 2020-03-05 04:38:26
问题 How can this be approached if there is no dart package available 回答1: You can copy paste run full code below You can use package https://pub.dev/packages/flutter_sticky_header code snippet StickyHeadersTable( columnsLength: titleColumn.length, rowsLength: titleRow.length, columnsTitleBuilder: (i) => Text(titleColumn[i]), rowsTitleBuilder: (i) => Text(titleRow[i]), contentCellBuilder: (i, j) => Container(height: 50, width: 50, child: TextField()), legendCell: Text('Sticky Legend'), ), working

Is there a way to create a spreadsheet like editable grid on flutter?

a 夏天 提交于 2020-03-05 04:38:10
问题 How can this be approached if there is no dart package available 回答1: You can copy paste run full code below You can use package https://pub.dev/packages/flutter_sticky_header code snippet StickyHeadersTable( columnsLength: titleColumn.length, rowsLength: titleRow.length, columnsTitleBuilder: (i) => Text(titleColumn[i]), rowsTitleBuilder: (i) => Text(titleRow[i]), contentCellBuilder: (i, j) => Container(height: 50, width: 50, child: TextField()), legendCell: Text('Sticky Legend'), ), working

Java集成pageoffice导出Excel

白昼怎懂夜的黑 提交于 2020-02-26 13:32:06
一、需求介绍   当前B/S模式已成为应用开发的主流,而在开发企业办公系统的过程中,常常有客户这样子要求:把系统数据库中的数据导出到Excel,用户查看报表时直接用Excel打开。或者是:用户已经习惯用Excel打印,也就要求必须把数据导入到Excel文件。这样在我们实际的开发中,很多时候需要实现导出Excel的应用。目前从网上找到的比较常用的实现Java导出Excel的技术有三种 POI、JXL、PageOffice,(CSV技术就不讨论了,它只是生成以逗号间隔的文本文件)下面我就分析一下这三种方案。 二、方案分析   POI 是apache的子项目,目标是处理ole2对象,它提供了一组操纵Windows文档的Java API。用于操作Excel格式文件的是HSSF接口,处理MS Excel对象,它不象我们用CSV生成的仅仅是没有格式的可以由Excel转换的文本文件,而是模拟操作Excel对象,你可以控制一些属性如sheet,cell等等。HSSF 是Horrible SpreadSheet Format的缩写,翻译过来就是“讨厌的电子表格格式”。 HSSF的名字很不严肃,但通过HSSF,你可以用Java代码来修改Excel文件内容。HSSF 为读取操作提供了两类API:usermodel和eventusermodel,即“用户模型”和“事件-用户模型”,接口比较抽象,不好理解。

Are the Office Web Components broken and dead?

自作多情 提交于 2020-02-23 07:58:21
问题 According to this article on Wikipedia®: "The Pivot Table and Spreadsheet web components do not function on Windows 7." Is this going to be fixed? 回答1: After personally testing the OWC on Windows 7, it does appear broken. 回答2: I totally disagree. I can use OWC in a WEBPAGE quite easily. It works flawlessly on Windows 7. On the other hand, I can't use OWC inside of an Access form because I use Office 2010 64-bit. 来源: https://stackoverflow.com/questions/4402493/are-the-office-web-components

How to add rows of zeroes in matrices/excel spreadsheet with code (MATLAB)?

∥☆過路亽.° 提交于 2020-02-16 11:32:48
问题 I made this program were the user can type in a year between 2009 and 2011 and get snow depth and air temperature data for the chosen year displayed on a graph. I have one xls file for the temperature for each day from day 1 to day 365. I also have another xls file for snow depth from day 1 to day 212. So some days they didn't bother to measure snow depth because it was summer anyways. Between 30. april to 1. october they didn't measure snow depth. I want to add 153 zeroes with code between

How to add rows of zeroes in matrices/excel spreadsheet with code (MATLAB)?

别说谁变了你拦得住时间么 提交于 2020-02-16 11:31:52
问题 I made this program were the user can type in a year between 2009 and 2011 and get snow depth and air temperature data for the chosen year displayed on a graph. I have one xls file for the temperature for each day from day 1 to day 365. I also have another xls file for snow depth from day 1 to day 212. So some days they didn't bother to measure snow depth because it was summer anyways. Between 30. april to 1. october they didn't measure snow depth. I want to add 153 zeroes with code between

How to add rows of zeroes in matrices/excel spreadsheet with code (MATLAB)?

故事扮演 提交于 2020-02-16 11:31:42
问题 I made this program were the user can type in a year between 2009 and 2011 and get snow depth and air temperature data for the chosen year displayed on a graph. I have one xls file for the temperature for each day from day 1 to day 365. I also have another xls file for snow depth from day 1 to day 212. So some days they didn't bother to measure snow depth because it was summer anyways. Between 30. april to 1. october they didn't measure snow depth. I want to add 153 zeroes with code between

Automatically stamp username who made changes to Google Sheet

那年仲夏 提交于 2020-02-06 02:49:53
问题 I have a Google Sheet that I would like to automatically stamp the username of the person who last made a change to a specific row. I currently have this code to work as I like to do the same function with the time: function onEdit() { var s = SpreadsheetApp.getActiveSheet(); var r = s.getActiveCell(); if( r.getColumn() != 2 ) { //checks the column var row = r.getRow(); var time = new Date(); time = Utilities.formatDate(time, "GMT-07:00", "yyyy-MM-dd, hh:mm:ss"); SpreadsheetApp.getActiveSheet