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;
}
}

最新文章

  1. Java之多态(一)
  2. Harp – 内置常用预处理器的静态 Web 服务器
  3. html5学习笔记:canvas
  4. 做技术最自由,在IT最幸福!
  5. 《1Q84》--[日]村上春树
  6. Mac vim iterm2配色方案
  7. jquery实现无缝滚动
  8. 将TIBCO Host 实例注册为Windows服务
  9. 路径和 二叉树 leecode
  10. hadoop 2.6.0上安装sqoop-1.99.6-bin-hadoop200
  11. JAVA内存模型与线程
  12. Android开发之基于监听的事件处理
  13. Visual Studio 实用技能
  14. ASP.NET Core中使用IOC三部曲(二.采用Autofac来替换IOC容器,并实现属性注入)
  15. NancyFX 第七章 模型绑定和验证
  16. python 使用多进程打开多个cmd窗口,并在子进程结束之后关闭cmd窗口
  17. 使用 CROSS APPLY 与 OUTER APPLY 连接查询
  18. HDU - 1260 (Tickets)
  19. 〖Android〗dropbear一些操作命令备忘
  20. 股票——成交量加权平均价VWAP

热门文章

  1. 热门前沿知识相关面试问题-MVC/MVP/MVVM架构设计模式面试问题详解
  2. Android异常与性能优化相关面试问题-OOM异常面试问题详解
  3. iOS View的一些操作定义为宏
  4. spark streaming基本概念一
  5. 1024&#183;程序员节来啦!MyEclipse致敬改变世界的程序猿
  6. 06-char,varchar和nvarchar三者的区别
  7. 报错:required string parameter XXX is not present
  8. 运行一次node服务后,再次运行报错
  9. Hadoop-No.7之行键
  10. 2. SaltStack数据系统: Grains、Pillar