Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
What Is jxl.jar 2.6.12
What is jxl.jar 2.6.12?
✍: fyicenter.com
jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12, which is a Java library for reading, writing and modifying Microsoft Excel spreadsheet files.
JAR File Size and Download Location:
JAR name: jxl-2.6.12.jar Target JDK version: 1.6 Dependency: None File name: jxl.jar File size: 725735 bytes Release date: 24-Oct-2009 Download: Java Excel API Website.
Here are Java Source Code files for jxl-2.6.12.jar:
⏎ jxl/read/biff/SupbookRecord.java
/********************************************************************* * * Copyright (C) 2002 Andrew Khan * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ***************************************************************************/ package jxl.read.biff; import jxl.common.Logger; import jxl.WorkbookSettings; import jxl.biff.IntegerHelper; import jxl.biff.RecordData; import jxl.biff.StringHelper; /** * A record containing the references to the various sheets (internal and * external) referenced by formulas in this workbook */ public class SupbookRecord extends RecordData { /** * The logger */ private static Logger logger = Logger.getLogger(SupbookRecord.class); /** * The type of this supbook record */ private Type type; /** * The number of sheets - internal & external supbooks only */ private int numSheets; /** * The name of the external file */ private String fileName; /** * The names of the external sheets */ private String[] sheetNames; /** * The type of supbook this refers to */ private static class Type {}; public static final Type INTERNAL = new Type(); public static final Type EXTERNAL = new Type(); public static final Type ADDIN = new Type(); public static final Type LINK = new Type(); public static final Type UNKNOWN = new Type(); /** * Constructs this object from the raw data * * @param t the raw data * @param ws the workbook settings */ SupbookRecord(Record t, WorkbookSettings ws) { super(t); byte[] data = getRecord().getData(); // First deduce the type if (data.length == 4) { if (data[2] == 0x01 && data[3] == 0x04) { type = INTERNAL; } else if (data[2] == 0x01 && data[3] == 0x3a) { type = ADDIN; } else { type = UNKNOWN; } } else if (data[0] == 0 && data[1] == 0) { type = LINK; } else { type = EXTERNAL; } if (type == INTERNAL) { numSheets = IntegerHelper.getInt(data[0], data[1]); } if (type == EXTERNAL) { readExternal(data, ws); } } /** * Reads the external data records * * @param data the data * @param ws the workbook settings */ private void readExternal(byte[] data, WorkbookSettings ws) { numSheets = IntegerHelper.getInt(data[0], data[1]); // subtract file name encoding from the length int ln = IntegerHelper.getInt(data[2], data[3]) - 1; int pos = 0; if (data[4] == 0) { // non-unicode string int encoding = data[5]; pos = 6; if (encoding == 0) { fileName = StringHelper.getString(data, ln, pos, ws); pos += ln; } else { fileName = getEncodedFilename(data, ln, pos); pos += ln; } } else { // unicode string int encoding = IntegerHelper.getInt(data[5], data[6]); pos = 7; if (encoding == 0) { fileName = StringHelper.getUnicodeString(data, ln, pos); pos += ln * 2; } else { fileName = getUnicodeEncodedFilename(data, ln, pos); pos += ln * 2; } } sheetNames = new String[numSheets]; for (int i = 0; i < sheetNames.length; i++) { ln = IntegerHelper.getInt(data[pos], data[pos + 1]); if (data[pos + 2] == 0x0) { sheetNames[i] = StringHelper.getString(data, ln, pos + 3, ws); pos += ln + 3; } else if (data[pos + 2] == 0x1) { sheetNames[i] = StringHelper.getUnicodeString(data, ln, pos + 3); pos += ln * 2 + 3; } } } /** * Gets the type of this supbook record * * @return the type of this supbook */ public Type getType() { return type; } /** * Gets the number of sheets. This will only be non-zero for internal * and external supbooks * * @return the number of sheets */ public int getNumberOfSheets() { return numSheets; } /** * Gets the name of the external file * * @return the name of the external file */ public String getFileName() { return fileName; } /** * Gets the name of the external sheet * * @param i the index of the external sheet * @return the name of the sheet */ public String getSheetName(int i) { return sheetNames[i]; } /** * Gets the data - used when copying a spreadsheet * * @return the raw external sheet data */ public byte[] getData() { return getRecord().getData(); } /** * Gets the encoded string from the data array * * @param data the data * @param ln length of the string * @param pos the position in the array * @return the string */ private String getEncodedFilename(byte[] data, int ln, int pos) { StringBuffer buf = new StringBuffer(); int endpos = pos + ln; while (pos < endpos) { char c = (char) data[pos]; if (c == '\u0001') { // next character is a volume letter pos++; c = (char) data[pos]; buf.append(c); buf.append(":\\\\"); } else if (c == '\u0002') { // file is on the same volume buf.append('\\'); } else if (c == '\u0003') { // down directory buf.append('\\'); } else if (c == '\u0004') { // up directory buf.append("..\\"); } else { // just add on the character buf.append(c); } pos++; } return buf.toString(); } /** * Gets the encoded string from the data array * * @param data the data * @param ln length of the string * @param pos the position in the array * @return the string */ private String getUnicodeEncodedFilename(byte[] data, int ln, int pos) { StringBuffer buf = new StringBuffer(); int endpos = pos + ln * 2; while (pos < endpos) { char c = (char) IntegerHelper.getInt(data[pos], data[pos + 1]); if (c == '\u0001') { // next character is a volume letter pos += 2; c = (char) IntegerHelper.getInt(data[pos], data[pos + 1]); buf.append(c); buf.append(":\\\\"); } else if (c == '\u0002') { // file is on the same volume buf.append('\\'); } else if (c == '\u0003') { // down directory buf.append('\\'); } else if (c == '\u0004') { // up directory buf.append("..\\"); } else { // just add on the character buf.append(c); } pos += 2; } return buf.toString(); } }
⏎ jxl/read/biff/SupbookRecord.java
Or download all of them as a single archive file:
File name: jxl-2.6.12-src.zip File size: 824057 bytes Release date: 2009-10-24 Download
⇐ What Is jexcelapi_2_6_12.zip
2017-06-09, 88758👍, 6💬
Popular Posts:
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
pache Derby is an open source relational database implemented entirely in Java and available under t...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
HttpComponents Core Source Code Files are provided in the source package file, httpcomponents-core-5...
commons-lang-2.6.jar is the JAR file for Apache Commons Lang 2.6, which provides a host of helper ut...