Excel不同版本差异性
apache poi-3.16.jar
- /* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ==================================================================== */
- package org.apache.poi.ss;
- import org.apache.poi.ss.util.CellReference;
- /**
- * This enum allows spreadsheets from multiple Excel versions to be handled by the common code.
- * <p>Properties of this enum correspond to attributes of the <i>spreadsheet</i> that are easily
- * discernable to the user. It is not intended to deal with low-level issues like file formats.
- */
- public enum SpreadsheetVersion {
- /**
- * Excel97 format aka BIFF8
- * <ul>
- * <li>The total number of available rows is 64k (2^16)</li>
- * <li>The total number of available columns is 256 (2^8)</li>
- * <li>The maximum number of arguments to a function is 30</li>
- * <li>Number of conditional format conditions on a cell is 3</li>
- * <li>Number of cell styles is 4000</li>
- * <li>Length of text cell contents is 32767</li>
- * </ul>
- */
- EXCEL97(0x10000, 0x0100, 30, 3, 4000, 32767),
- /**
- * Excel2007
- *
- * <ul>
- * <li>The total number of available rows is 1M (2^20)</li>
- * <li>The total number of available columns is 16K (2^14)</li>
- * <li>The maximum number of arguments to a function is 255</li>
- * <li>Number of conditional format conditions on a cell is unlimited
- * (actually limited by available memory in Excel)</li>
- * <li>Number of cell styles is 64000</li>
- * <li>Length of text cell contents is 32767</li>
- * <ul>
- */
- EXCEL2007(0x100000, 0x4000, 255, Integer.MAX_VALUE, 64000, 32767);
- private final int _maxRows;
- private final int _maxColumns;
- private final int _maxFunctionArgs;
- private final int _maxCondFormats;
- private final int _maxCellStyles;
- private final int _maxTextLength;
- private SpreadsheetVersion(int maxRows, int maxColumns, int maxFunctionArgs, int maxCondFormats, int maxCellStyles, int maxText) {
- _maxRows = maxRows;
- _maxColumns = maxColumns;
- _maxFunctionArgs = maxFunctionArgs;
- _maxCondFormats = maxCondFormats;
- _maxCellStyles = maxCellStyles;
- _maxTextLength = maxText;
- }
- /**
- * @return the maximum number of usable rows in each spreadsheet
- */
- public int getMaxRows() {
- return _maxRows;
- }
- /**
- * @return the last (maximum) valid row index, equals to <code> getMaxRows() - 1 </code>
- */
- public int getLastRowIndex() {
- return _maxRows - 1;
- }
- /**
- * @return the maximum number of usable columns in each spreadsheet
- */
- public int getMaxColumns() {
- return _maxColumns;
- }
- /**
- * @return the last (maximum) valid column index, equals to <code> getMaxColumns() - 1 </code>
- */
- public int getLastColumnIndex() {
- return _maxColumns - 1;
- }
- /**
- * @return the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF)
- */
- public int getMaxFunctionArgs() {
- return _maxFunctionArgs;
- }
- /**
- * @return the maximum number of conditional format conditions on a cell
- */
- public int getMaxConditionalFormats() {
- return _maxCondFormats;
- }
- /**
- * @return the maximum number of cell styles per spreadsheet
- */
- public int getMaxCellStyles() {
- return _maxCellStyles;
- }
- /**
- *
- * @return the last valid column index in a ALPHA-26 representation
- * (<code>IV</code> or <code>XFD</code>).
- */
- public String getLastColumnName() {
- return CellReference.convertNumToColString(getLastColumnIndex());
- }
- /**
- * @return the maximum length of a text cell
- */
- public int getMaxTextLength() {
- return _maxTextLength;
- }
- }
Excel不同版本差异性的更多相关文章
- poi解析Excel文件版本问题
poi解析Excel文件时有两种格式: HSSFWorkbook格式用来解析Excel2003(xls)的文件 XSSFWorkbook格式用来解析Excel2007(xlsx)的文件 如果用HSSF ...
- Excel的版本
https://en.wikipedia.org/wiki/Microsoft_Excel 取自维基百科,需要特别注意的是,从v12开始,有很大的改变.后缀名从xls变为xlsx Versions 5 ...
- Excel 97-2003版本内部结构与查看方法
MS-XLS内部结构:BIFF格式 https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/cd03cb5f-ca0 ...
- Excel导入数据(97--2003版本)的ExcelHelper
首先确定excel的版本为97~2003版本 其次创建一个帮助类——ExcelHelper //单个sheet public static DataTable AnalysisExcel(string ...
- 判断Excel版本信息
可以通过获取application对应的Version属性获取当前打开的Excel的版本信息(Application.Version).
- java 直接调用micorosoft office (2003-2007和2010版本)中excel中计算函数
主要是讲述java中poi读取excel,而excel的版本包括:2003-2007和2010两个版本, 即excel的后缀名为:xls和xlsx 读取excel和MySQL相关: java的poi技 ...
- 阿里的Easyexcel读取Excel文件(最新版本)
本篇文章主要介绍一下使用阿里开源的Easyexcel工具处理读取excel文件,因为之前自己想在网上找一下这个简单的立即上手的博客,发现很多文章的教程都针对比较旧的版本的Easyexcel,没有使 ...
- NPOI操作EXCEL(二)——大量不同模板时设计方式
上一篇文章介绍了一些NPOI的基础接口,我们现在就来看看具体怎么用NPOI来解析一个EXCEL. 博主现在有这么一堆excel需要解析数据入库: 当然这只是员工的简要模板,还有很多其他的模板.我们可以 ...
- 浅谈Excel开发:十一 针对64位Excel的插件的开发和部署
自Office 2010版本开始有了32位和64位之分,对Excel来说,32位的Excel和64位的Excel在性能上的主要区别是64位的Excel能够处理2G及2G以上的大数据集. 随着64位操作 ...
随机推荐
- Hive(七)Hive参数操作和运行方式
Hive参数操作和运行方式 1.Hive参数操作 1.hive参数介绍 hive当中的参数.变量都是以命名空间开头的,详情如下表所示: 命名空间 读写权限 含义 hiveconf 可读写 hive ...
- 【安徽集训】fiend
考试的时候只会 \(O(Tn^3)\) 的做法,其它题还都不会,想到一整场就打这么点是人都能写的暴力没啥意思,就懒得写了.. Description 双人博弈.每一轮 A 和 B 同时选择一个 \(1 ...
- SQL Server中四类事务并发问题的实例再现(转)
本篇文章将用实例再现数据库访问中四类并发问题,希望能让初学者能对事务的并行性有进一步的理解. 首先,让我们先来了解一下并行问题以及事务隔离级别这两个概念.在数据库中,假设如果没有锁定且多个用户同时访问 ...
- HTML符号代码速查表
HTML实体符号被用作实现保留字符(reserved characters)或者表达键盘无法输入的一些常用字符.在大多数浏览器中默认的字符集为ISO-8859-1.HTML实体符号使我们在网页设计中经 ...
- JS 数组相关的操作函数
// 1.数组拼接 concat() var a = [1, 2]; var b = [3, 4]; console.log(a.concat(b)); // [1, 2, 3, 4] // 2.数组 ...
- servlet 如何处理多请求访问以及线程讲解
servlet 如何处理多请求访问以及线程讲解 场景:js循环500次请求同一个后台接口,接口内部逻辑:1.查询商品数量,2.扣减商品数量 ,那么该接口是否需要考虑多线程并发安全问题? 分析: 1.先 ...
- Task底层实现原理探秘
.NET 4包含新名称空间System.Threading.Tasks,它 包含的类抽象出了线程功能, 在底层使用ThreadPool. 任务表示应完成的某个单元的工作. 这个单元的工作可以在单独的线 ...
- hive日期函数-杂谈(一)
来到广发返现由于历史遗留问题很多时间格式十分杂乱 我将总结一下时间日期的事情 1.hive原生时间函数的功能 2.一些基本业务时间范围的指标的sql案例 3.自定义udf函数让后来人更方便
- Python之exec()/compile()方法使用
# Python内置函数exec()可以用来执行Python代码 # 或内置函数compile()编译的代码对象 # exec程序中可写入python语法格式的代码,并直接输出. exec('prin ...
- BSGS 扩展大步小步法解决离散对数问题 (BZOJ 3239: Discrete Logging// 2480: Spoj3105 Mod)
我先转为敬? orz% miskcoo 贴板子 BZOJ 3239: Discrete Logging//2480: Spoj3105 Mod(两道题输入不同,我这里只贴了3239的代码) CODE ...