From 3bcd8fd4790b54fa0b159dcf1c0a2a204e96abb8 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Fri, 3 Apr 2009 16:42:39 +0000 Subject: [PATCH] added SpreadsheetVersion enum to hold version-specific properties such as maximum number of rows and columns, etc. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@761723 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/SpreadsheetVersion.java | 122 ++++++++++++++++++ .../org/apache/poi/ss/util/CellReference.java | 2 +- .../apache/poi/ss/TestSpreadsheetVersion.java | 49 +++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100755 src/java/org/apache/poi/ss/SpreadsheetVersion.java create mode 100755 src/testcases/org/apache/poi/ss/TestSpreadsheetVersion.java diff --git a/src/java/org/apache/poi/ss/SpreadsheetVersion.java b/src/java/org/apache/poi/ss/SpreadsheetVersion.java new file mode 100755 index 000000000..754fbdbb6 --- /dev/null +++ b/src/java/org/apache/poi/ss/SpreadsheetVersion.java @@ -0,0 +1,122 @@ +/* ==================================================================== + 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. + * Properties of this enum correspond to attributes of the spreadsheet that are easily + * discernable to the user. It is not intended to deal with low-level issues like file formats. + *

+ * + * For internal POI use only + * + * @author Josh Micich + * @author Yegor Kozlov + */ +public enum SpreadsheetVersion { + /** + * Excel97 format aka BIFF8 + *

+ */ + EXCEL97(0x10000, 0x0100, 30, 3), + + /** + * Excel2007 + * + *