working on xslx

This commit is contained in:
Jörg Prante 2024-05-16 16:33:21 +02:00
parent d0f7392cf0
commit 0667b90ac4
476 changed files with 2227 additions and 2317 deletions

View file

@ -1,18 +1,13 @@
plugins {
id "checkstyle"
id "pmd"
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1"
id "com.github.spotbugs" version "6.0.0-beta.3"
id "org.cyclonedx.bom" version "1.7.4"
id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0"
}
wrapper {
gradleVersion = libs.versions.gradle.get()
distributionType = Wrapper.DistributionType.ALL
distributionType = Wrapper.DistributionType.BIN
}
ext {
@ -31,16 +26,10 @@ ext {
}
subprojects {
//apply from: rootProject.file('gradle/ide/idea.gradle')
apply from: rootProject.file('gradle/repositories/maven.gradle')
apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle')
apply from: rootProject.file('gradle/documentation/asciidoc.gradle')
apply from: rootProject.file('gradle/quality/checkstyle.gradle')
apply from: rootProject.file('gradle/quality/pmd.gradle')
//apply from: rootProject.file('gradle/quality/spotbugs.gradle')
apply from: rootProject.file('gradle/publish/maven.gradle')
}
apply from: rootProject.file('gradle/publish/sonatype.gradle')
apply from: rootProject.file('gradle/publish/forgejo.gradle')
apply from: rootProject.file('gradle/quality/cyclonedx.gradle')

View file

@ -1,28 +0,0 @@
/*********************************************************************
*
* 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;
/**
* Interface for cell formats - used for typing information
*
* @deprecated Repackaged as jxl.format.CellFormat
*/
public interface CellFormat extends jxl.format.CellFormat {
}

View file

@ -0,0 +1,4 @@
module org.xbib.datastructures.xslx {
requires java.xml;
exports org.xbib.datastructures.xslx;
}

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
public class Cell {
Cell(String r, String s, String t, String v, String text) {

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.support;
package org.xbib.datastructures.xslx;
public class CellFormat {
public CellFormat() {

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;

View file

@ -1,18 +1,21 @@
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;
import java.io.IOException;
public interface ExcelRowIterator {
public void init();
void init() throws IOException, XMLStreamException;
public boolean nextRow();
boolean nextRow();
public String getCellValue(int col);
String getCellValue(int col);
public int getCellCount();
int getCellCount();
public byte getSheetIndex();
byte getSheetIndex();
public int getRowPos();
int getRowPos();
public void prevRow();
void prevRow();
}

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
public class FontRegion {

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
public abstract class IndexedObject {
int index;

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamReader;

View file

@ -1,9 +1,8 @@
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import com.incesoft.tools.excel.support.XLSReaderSupport;
import com.incesoft.tools.excel.support.XLSXReaderSupport;
import java.io.IOException;
abstract public class ReaderSupport {
@ -14,7 +13,7 @@ abstract public class ReaderSupport {
abstract public void open();
abstract public ExcelRowIterator rowIterator();
abstract public ExcelRowIterator rowIterator() throws XMLStreamException, IOException;
abstract public void close();

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import java.util.ArrayList;

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

View file

@ -1,6 +1,7 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -9,8 +10,8 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook.ModifyEntry;
import com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook.XMLStreamCreator;
import org.xbib.datastructures.xslx.SimpleXLSXWorkbook.ModifyEntry;
import org.xbib.datastructures.xslx.SimpleXLSXWorkbook.XMLStreamCreator;
/**
* One Sheet in a workbook.It provides read and write functions of the
@ -42,7 +43,7 @@ public class Sheet {
*/
boolean alreadyParsed = false;
void parseAllRows() {
void parseAllRows() throws IOException {
if (!alreadyParsed) {
alreadyParsed = true;
new SheetRowReader(this, workbook.getSheetReader(sheetIndex + 1),
@ -216,7 +217,7 @@ public class Sheet {
}
public SheetRowReader newReader() {
public SheetRowReader newReader() throws IOException {
return new SheetRowReader(this,
workbook.getSheetReader(sheetIndex + 1), false);
}
@ -240,7 +241,7 @@ public class Sheet {
private int rowCount = -2;
// count of the lazy or non-lazy rows
public int getRowCount() {
public int getRowCount() throws IOException, XMLStreamException {
if (alreadyParsed && addToMemory) {
return parsedRows.size();
}
@ -250,10 +251,10 @@ public class Sheet {
try {
// <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
// <worksheet ...><dimension ref="A1:C3"/>...<sheetData>
loopR: while (reader.hasNext()) {
loopR:
while (reader.hasNext()) {
int type = reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
if (type == XMLStreamReader.START_ELEMENT) {
if ("dimension".equals(reader.getLocalName())) {
String v = reader.getAttributeValue(null, "ref");
if (v != null) {
@ -275,16 +276,10 @@ public class Sheet {
if (r > rowCount)
rowCount = r;
}
break;
}
}
} catch (XMLStreamException e) {
throw new RuntimeException(e);
} finally {
try {
reader.close();
} catch (XMLStreamException e) {
}
}
}
return rowCount;
@ -637,16 +632,7 @@ public class Sheet {
private boolean merged = false;
/**
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <worksheet
* xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
* xmlns:r=
* "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ><sheetData>
*
* @param writer
* @throws XMLStreamException
*/
void mergeSheet() throws XMLStreamException {
void mergeSheet() throws XMLStreamException, IOException {
if (merged) {
writeSheet();
return;

View file

@ -1,11 +1,11 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import java.util.StringTokenizer;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook.XMLStreamCreator;
import org.xbib.datastructures.xslx.SimpleXLSXWorkbook.XMLStreamCreator;
public class SheetCommentWriter {

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.xlsx;
package org.xbib.datastructures.xslx;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -32,31 +32,12 @@ import javax.xml.stream.XMLStreamWriter;
/**
* A simple implementation of OOXML(Excel part) to read and modify Excel 2007+
* documents
*
*/
public class SimpleXLSXWorkbook {
static {
// this the fastest stax implementation by test,especially when doing
// output
if ("false".equals(System.getProperty("ince.tools.excel.disableXMLOptimize"))) {
System.setProperty("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
System.setProperty("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory");
}
}
ZipFile zipfile;
private static final XMLInputFactory inputFactory = XMLInputFactory.newInstance();
private InputStream findData(String name) {
try {
ZipEntry entry = zipfile.getEntry(name);
if (entry != null) {
return zipfile.getInputStream(entry);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return null;
}
private ZipFile zipfile;
private static final String PATH_XL_RELATION = "xl/_rels/workbook.xml.rels";
@ -66,9 +47,9 @@ public class SimpleXLSXWorkbook {
private static final String PATH_CONTENT_TYPES = "[Content_Types].xml";
static private List<Pattern> blackListPatterns = new ArrayList<Pattern>();
private static final List<Pattern> blackListPatterns = new ArrayList<Pattern>();
static private List<String> blackList = Arrays.asList(".*comments\\d+\\.xml", ".*calcChain\\.xml",
private static final List<String> blackList = Arrays.asList(".*comments\\d+\\.xml", ".*calcChain\\.xml",
".*drawings/vmlDrawing\\d+\\.vml");
static {
for (String pstr : blackList) {
@ -76,16 +57,22 @@ public class SimpleXLSXWorkbook {
}
}
public SimpleXLSXWorkbook(File file) {
try {
public SimpleXLSXWorkbook() {
sheets.add(new Sheet(0, this));
}
public SimpleXLSXWorkbook(File file) throws IOException, XMLStreamException {
this.zipfile = new ZipFile(file);
InputStream stream = findData(PATH_SHAREDSTRINGS);
if (stream != null) {
parseSharedStrings(stream);
}
initSheets();
} catch (Exception e) {
throw new RuntimeException(e);
for (int i = 0; true; i++) {
ZipEntry entry = zipfile.getEntry(getSheetPath(i + 1));
if (entry == null) {
break;
}
sheets.add(new Sheet(i, this));
}
}
@ -170,17 +157,6 @@ public class SimpleXLSXWorkbook {
return null;
}
// int getSharedStringIndex(String string) {
// Integer i = (Integer) sharedStrings.inverseBidiMap().get(string);
// if (i != null) {
// return i;
// } else {
// return -1;
// }
// }
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
private String getSheetPath(int i) {
return String.format(PATH_SHEET, i);
}
@ -193,7 +169,8 @@ public class SimpleXLSXWorkbook {
return String.format(PATH_SHEET_COMMENT_VMLDRAWING, i);
}
private void parseSharedStrings(InputStream inputStream) throws Exception {
private void parseSharedStrings(InputStream inputStream)
throws XMLStreamException {
XMLStreamReader reader = inputFactory.createXMLStreamReader(inputStream);
int type;
boolean si = false;
@ -241,10 +218,23 @@ public class SimpleXLSXWorkbook {
private static final String PATH_STYLES = "xl/styles.xml";
private static final String STR_XML_HEAD = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
private static final byte[] DATA_XL_WORKSHEETS__RELS_SHEET = (STR_XML_HEAD + "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"></Relationships>")
.getBytes();
XMLStreamReader getReader(String resourceId) {
XMLStreamReader getSheetReader(Integer sheetId) throws IOException {
if (sheetId == null) {
sheetId = 1;
}
return getReader(getSheetPath(sheetId));
}
XMLStreamReader getStylesReader() throws IOException {
return getReader(PATH_STYLES);
}
private XMLStreamReader getReader(String resourceId) throws IOException {
InputStream stream = findData(resourceId);
if (stream == null) {
if (resourceId.startsWith("xl/worksheets/_rels/sheet")) {
@ -262,30 +252,9 @@ public class SimpleXLSXWorkbook {
}
}
XMLStreamReader getSheetReader(Integer sheetId) {
if (sheetId == null) {
sheetId = 1;
}
return getReader(getSheetPath(sheetId));
}
XMLStreamReader getStylesReader() {
return getReader(PATH_STYLES);
}
// SHEET>>>
List<Sheet> sheets = new ArrayList<Sheet>();
private void initSheets() {
for (int i = 0; true; i++) {
ZipEntry entry = zipfile.getEntry(getSheetPath(i + 1));
if (entry == null) {
break;
}
sheets.add(new Sheet(i, this));
}
}
/**
* create new sheet added to exists sheet list
*/
@ -299,11 +268,11 @@ public class SimpleXLSXWorkbook {
return sheets.size();
}
public Sheet getSheet(int i) {
public Sheet getSheet(int i) throws IOException {
return getSheet(i, true);
}
public Sheet getSheet(int i, boolean parseAllRow) {
public Sheet getSheet(int i, boolean parseAllRow) throws IOException {
if (i >= sheets.size())
throw new IllegalArgumentException("sheet " + i + " not exists!SheetCount=" + sheets.size());
Sheet sheet = sheets.get(i);
@ -419,7 +388,7 @@ public class SimpleXLSXWorkbook {
writer.writeEndElement();// end sst
}
private void mergeStyles(XMLStreamWriter writer) throws XMLStreamException {
private void mergeStyles(XMLStreamWriter writer) throws XMLStreamException, IOException {
prepareStylesCount();
XMLStreamReader reader = getStylesReader();
@ -606,12 +575,11 @@ public class SimpleXLSXWorkbook {
boolean stylesCountLoaded = false;
private void prepareStylesCount() {
private void prepareStylesCount() throws XMLStreamException, IOException {
if (stylesCountLoaded)
return;
stylesCountLoaded = true;
try {
XMLStreamReader reader = getStylesReader();
loop1: while (reader.hasNext()) {
int event = reader.next();
@ -634,9 +602,6 @@ public class SimpleXLSXWorkbook {
break;
}
}
} catch (XMLStreamException e) {
throw new RuntimeException(e);
}
}
/**
@ -652,7 +617,7 @@ public class SimpleXLSXWorkbook {
return new Fill();
}
public CellStyle createStyle(Font font, Fill fill) {
public CellStyle createStyle(Font font, Fill fill) throws XMLStreamException, IOException {
if (font == null && fill == null) {
throw new IllegalArgumentException("either font or fill is required");
}
@ -831,14 +796,10 @@ public class SimpleXLSXWorkbook {
/**
* merge the sheet's modifications
*/
public void commitSheetModifications() {
try {
public void commitSheetModifications() throws XMLStreamException, IOException {
if (lastCommitSheet == null)
throw new IllegalStateException("plz call beginCommitSheet(Sheet) first");
lastCommitSheet.mergeSheet();
} catch (XMLStreamException e) {
throw new RuntimeException(e);
}
}
/**
@ -1065,21 +1026,6 @@ public class SimpleXLSXWorkbook {
commiter.endCommit();
}
// MODIFY <<<
// TEST
public static void testMergeStyles(SimpleXLSXWorkbook excel, XMLStreamWriter writer) throws Exception {
// CellStyle style = excel.createStyle();
// style.setFont(new Font());
// style.getFont().setColor("FFFF0000");
// style = excel.createStyle();
// style.setFont(new Font());
// style.setFill(new Fill());
// style.getFont().setColor("FF0000FF");
// style.getFill().setFgColor("FF00FF00");
}
@SuppressWarnings("unchecked")
static private class BidirectionMap implements Map {
private Map values = new LinkedHashMap();
@ -1141,4 +1087,12 @@ public class SimpleXLSXWorkbook {
}
}
private InputStream findData(String name) throws IOException {
ZipEntry entry = zipfile.getEntry(name);
if (entry != null) {
return zipfile.getInputStream(entry);
}
return null;
}
}

View file

@ -1,12 +1,10 @@
package org.xbib.datastructures.xslx;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import com.incesoft.tools.excel.support.CellFormat;
import com.incesoft.tools.excel.support.XLSWriterSupport;
import com.incesoft.tools.excel.support.XLSXWriterSupport;
abstract public class WriterSupport {
public final static int TYPE_XLS = 1;
@ -28,11 +26,11 @@ abstract public class WriterSupport {
abstract public void open();
abstract public void createNewSheet();
abstract public void createNewSheet() throws IOException;
abstract public void writeRow(String[] rowData);
abstract public void writeRow(String[] rowData) throws XMLStreamException, IOException;
abstract public void writeRow(String[] rowData, CellFormat[] formats);
abstract public void writeRow(String[] rowData, CellFormat[] formats) throws XMLStreamException, IOException;
abstract public void close();
@ -69,10 +67,10 @@ abstract public class WriterSupport {
protected int sheetIndex = -1;
public void increaseRow() {
public void increaseRow() throws IOException {
rowpos++;
if (rowpos > getMaxRowNumOfSheet()) {// 判断是否需要新建一个sheet
if (rowpos > getMaxRowNumOfSheet()) {
sheetIndex++;
createNewSheet();
rowpos = -1;

View file

@ -1,16 +1,13 @@
package com.incesoft.tools.excel.support;
package org.xbib.datastructures.xslx;
import java.io.File;
import java.text.SimpleDateFormat;
import org.xbib.datastructures.xslx.ExcelRowIterator;
import org.xbib.datastructures.xslx.ReaderSupport;
import jxl.Cell;
import jxl.CellType;
import jxl.DateCell;
import jxl.Sheet;
import jxl.Workbook;
import org.xbib.datastructures.xslx.jxl.Cell;
import org.xbib.datastructures.xslx.jxl.CellType;
import org.xbib.datastructures.xslx.jxl.DateCell;
import org.xbib.datastructures.xslx.jxl.Sheet;
import org.xbib.datastructures.xslx.jxl.Workbook;
public class XLSReaderSupport extends ReaderSupport {

View file

@ -1,4 +1,4 @@
package com.incesoft.tools.excel.support;
package org.xbib.datastructures.xslx;
import java.io.IOException;
import java.util.ArrayList;
@ -7,18 +7,16 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jxl.Workbook;
import jxl.format.Colour;
import jxl.format.RGB;
import jxl.write.Label;
import jxl.write.WritableCell;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import org.xbib.datastructures.xslx.WriterSupport;
import org.xbib.datastructures.xslx.jxl.Workbook;
import org.xbib.datastructures.xslx.jxl.format.Colour;
import org.xbib.datastructures.xslx.jxl.format.RGB;
import org.xbib.datastructures.xslx.jxl.write.Label;
import org.xbib.datastructures.xslx.jxl.write.WritableCell;
import org.xbib.datastructures.xslx.jxl.write.WritableCellFormat;
import org.xbib.datastructures.xslx.jxl.write.WritableFont;
import org.xbib.datastructures.xslx.jxl.write.WritableSheet;
import org.xbib.datastructures.xslx.jxl.write.WritableWorkbook;
import org.xbib.datastructures.xslx.jxl.write.WriteException;
public class XLSWriterSupport extends WriterSupport {
WritableSheet sheet;

View file

@ -1,13 +1,11 @@
package com.incesoft.tools.excel.support;
package org.xbib.datastructures.xslx;
import java.io.File;
import java.io.IOException;
import org.xbib.datastructures.xslx.ExcelRowIterator;
import org.xbib.datastructures.xslx.ReaderSupport;
import com.incesoft.tools.excel.xlsx.Cell;
import com.incesoft.tools.excel.xlsx.Sheet;
import com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook;
import com.incesoft.tools.excel.xlsx.Sheet.SheetRowReader;
import org.xbib.datastructures.xslx.Sheet.SheetRowReader;
import javax.xml.stream.XMLStreamException;
public class XLSXReaderSupport extends ReaderSupport {
@ -33,7 +31,7 @@ public class XLSXReaderSupport extends ReaderSupport {
|| curRow[col] == null)
return null;
String v = curRow[col].getValue();
return v == null || v.trim().length() == 0 ? null : v.trim();
return v == null || v.trim().isEmpty() ? null : v.trim();
}
public int getRowPos() {
@ -46,7 +44,7 @@ public class XLSXReaderSupport extends ReaderSupport {
SheetRowReader reader;
public void init() {
public void init() throws IOException {
reader = sheet.newReader();
}
@ -85,14 +83,14 @@ public class XLSXReaderSupport extends ReaderSupport {
int rowPos = -1;
public void init() {
public void init() throws XMLStreamException, IOException {
currentSheetRowCount = sheet.getRowCount();
}
public boolean nextRow() {
rowPos++;
if (rowPos == currentSheetRowCount) {// 当读取最后一行,如果当前读取的是当前sheet的最后一行
return false;// 所有记录里面的最后一行
if (rowPos == currentSheetRowCount) {
return false;
}
return true;
}
@ -101,7 +99,7 @@ public class XLSXReaderSupport extends ReaderSupport {
if (col < 0)
return null;
String v = sheet.getCellValue(rowPos, col);
return v == null || v.trim().length() == 0 ? null : v.trim();
return v == null || v.trim().isEmpty() ? null : v.trim();
}
public byte getSheetIndex() {
@ -138,7 +136,7 @@ public class XLSXReaderSupport extends ReaderSupport {
}
}
public ExcelRowIterator rowIterator() {
public ExcelRowIterator rowIterator() throws XMLStreamException, IOException {
ExcelRowIterator iterator = lazy ? new LazyXLSXObjectIterator()
: new XLSXObjectIterator();
iterator.init();

View file

@ -1,25 +1,15 @@
package com.incesoft.tools.excel.support;
package org.xbib.datastructures.xslx;
import java.io.File;
import javax.xml.stream.XMLStreamException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xbib.datastructures.xslx.WriterSupport;
import com.incesoft.tools.excel.xlsx.CellStyle;
import com.incesoft.tools.excel.xlsx.Fill;
import com.incesoft.tools.excel.xlsx.Font;
import com.incesoft.tools.excel.xlsx.Sheet;
import com.incesoft.tools.excel.xlsx.SimpleXLSXWorkbook;
public class XLSXWriterSupport extends WriterSupport {
SimpleXLSXWorkbook workbook;
public void open() {
if (getClass().getResource("/empty.xlsx") == null) {
throw new IllegalStateException("no empty.xlsx found in classpath");
}
workbook = new SimpleXLSXWorkbook(new File(getClass().getResource("/empty.xlsx").getFile()));
workbook = new SimpleXLSXWorkbook();
}
Sheet sheet;
@ -28,17 +18,17 @@ public class XLSXWriterSupport extends WriterSupport {
return Integer.MAX_VALUE / 2;
}
public void writeRow(String[] rowData) {
public void writeRow(String[] rowData) throws XMLStreamException, IOException {
writeRow(rowData, null);
}
public void writeRow(String[] rowData, CellFormat[] formats) {
public void writeRow(String[] rowData, CellFormat[] formats) throws XMLStreamException, IOException {
for (int col = 0; col < rowData.length; col++) {
String string = rowData[col];
if (string == null)
continue;
CellFormat format = null;
if (formats != null && formats.length > 0) {
if (formats != null) {
for (CellFormat cellFormat : formats) {
if (cellFormat != null && cellFormat.getCellIndex() == col) {
format = cellFormat;
@ -92,7 +82,7 @@ public class XLSXWriterSupport extends WriterSupport {
}
}
public void createNewSheet() {
public void createNewSheet() throws IOException {
if (sheetIndex > 0) {
throw new IllegalStateException("only one sheet allowed");
}

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* This type represents the Microsoft concept of a Boolean. Accordingly, this

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A mixin interface for numerical formulas, which combines the interfaces

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.format.CellFormat;
import org.xbib.datastructures.xslx.jxl.format.CellFormat;
/**
* Represents an individual Cell within a Sheet. May be queried for its

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.biff.BaseCellFeatures;
import org.xbib.datastructures.xslx.jxl.biff.BaseCellFeatures;
/**
* Container for any additional cell features

View file

@ -17,9 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.write.WritableWorkbook;
import org.xbib.datastructures.xslx.jxl.write.WritableWorkbook;
import org.xbib.datastructures.xslx.jxl.biff.formula.ExternalSheet;
/**
* Exposes some cell reference helper methods to the public interface.
@ -41,7 +42,7 @@ public final class CellReferenceHelper {
* @param buf the string buffer to append
*/
public static void getCellReference(int column, int row, StringBuffer buf) {
jxl.biff.CellReferenceHelper.getCellReference(column, row, buf);
org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference(column, row, buf);
}
/**
@ -58,7 +59,7 @@ public final class CellReferenceHelper {
int row,
boolean rowabs,
StringBuffer buf) {
jxl.biff.CellReferenceHelper.getCellReference(column, colabs,
org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference(column, colabs,
row, rowabs,
buf);
}
@ -72,7 +73,7 @@ public final class CellReferenceHelper {
* @return the cell reference
*/
public static String getCellReference(int column, int row) {
return jxl.biff.CellReferenceHelper.getCellReference(column, row);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference(column, row);
}
/**
@ -82,7 +83,7 @@ public final class CellReferenceHelper {
* @return the column portion of the cell reference
*/
public static int getColumn(String s) {
return jxl.biff.CellReferenceHelper.getColumn(s);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getColumn(s);
}
/**
@ -92,7 +93,7 @@ public final class CellReferenceHelper {
* @return the letter for that column number
*/
public static String getColumnReference(int c) {
return jxl.biff.CellReferenceHelper.getColumnReference(c);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getColumnReference(c);
}
/**
@ -102,7 +103,7 @@ public final class CellReferenceHelper {
* @return the row number
*/
public static int getRow(String s) {
return jxl.biff.CellReferenceHelper.getRow(s);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getRow(s);
}
/**
@ -112,7 +113,7 @@ public final class CellReferenceHelper {
* @return TRUE if the column is relative, FALSE otherwise
*/
public static boolean isColumnRelative(String s) {
return jxl.biff.CellReferenceHelper.isColumnRelative(s);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.isColumnRelative(s);
}
/**
@ -122,7 +123,7 @@ public final class CellReferenceHelper {
* @return TRUE if the row is relative, FALSE otherwise
*/
public static boolean isRowRelative(String s) {
return jxl.biff.CellReferenceHelper.isRowRelative(s);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.isRowRelative(s);
}
/**
@ -138,8 +139,8 @@ public final class CellReferenceHelper {
public static void getCellReference
(int sheet, int column, int row,
Workbook workbook, StringBuffer buf) {
jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (jxl.biff.formula.ExternalSheet) workbook, buf);
org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (ExternalSheet) workbook, buf);
}
/**
@ -157,8 +158,8 @@ public final class CellReferenceHelper {
int row,
WritableWorkbook workbook,
StringBuffer buf) {
jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (jxl.biff.formula.ExternalSheet) workbook, buf);
org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (ExternalSheet) workbook, buf);
}
/**
@ -180,9 +181,9 @@ public final class CellReferenceHelper {
boolean rowabs,
Workbook workbook,
StringBuffer buf) {
jxl.biff.CellReferenceHelper.getCellReference
org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, colabs, row, rowabs,
(jxl.biff.formula.ExternalSheet) workbook, buf);
(ExternalSheet) workbook, buf);
}
/**
@ -199,8 +200,8 @@ public final class CellReferenceHelper {
int column,
int row,
Workbook workbook) {
return jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (jxl.biff.formula.ExternalSheet) workbook);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (ExternalSheet) workbook);
}
/**
@ -217,8 +218,8 @@ public final class CellReferenceHelper {
int column,
int row,
WritableWorkbook workbook) {
return jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (jxl.biff.formula.ExternalSheet) workbook);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getCellReference
(sheet, column, row, (ExternalSheet) workbook);
}
@ -229,7 +230,7 @@ public final class CellReferenceHelper {
* @return the sheet name
*/
public static String getSheet(String ref) {
return jxl.biff.CellReferenceHelper.getSheet(ref);
return org.xbib.datastructures.xslx.jxl.biff.CellReferenceHelper.getSheet(ref);
}
/**

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* An enumeration type listing the available content types for a cell

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.format.CellFormat;
import org.xbib.datastructures.xslx.jxl.format.CellFormat;
/**
* This is a bean which client applications may use to get/set various

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.text.DateFormat;
import java.util.Date;

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A mixin interface for date formulas, which combines the interfaces

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* This type represents a cell which contains an error. This error will

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A mixin interface for numerical formulas, which combines the interfaces

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.biff.formula.FormulaException;
import org.xbib.datastructures.xslx.jxl.biff.formula.FormulaException;
/**
* Interface for formulas which allow clients to read the Excel formula

View file

@ -17,12 +17,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* Class which represents an Excel header or footer.
*/
public final class HeaderFooter extends jxl.biff.HeaderFooter {
public final class HeaderFooter extends org.xbib.datastructures.xslx.jxl.biff.HeaderFooter {
/**
* Default constructor.
*/
@ -98,7 +98,7 @@ public final class HeaderFooter extends jxl.biff.HeaderFooter {
*
* @return the created contents
*/
protected jxl.biff.HeaderFooter.Contents createContents() {
protected org.xbib.datastructures.xslx.jxl.biff.HeaderFooter.Contents createContents() {
return new Contents();
}
@ -108,7 +108,7 @@ public final class HeaderFooter extends jxl.biff.HeaderFooter {
* @param s the string to create the contents
* @return the created contents
*/
protected jxl.biff.HeaderFooter.Contents createContents(String s) {
protected org.xbib.datastructures.xslx.jxl.biff.HeaderFooter.Contents createContents(String s) {
return new Contents(s);
}
@ -118,15 +118,15 @@ public final class HeaderFooter extends jxl.biff.HeaderFooter {
* @param c the contents to copy
* @return the new contents
*/
protected jxl.biff.HeaderFooter.Contents
createContents(jxl.biff.HeaderFooter.Contents c) {
protected org.xbib.datastructures.xslx.jxl.biff.HeaderFooter.Contents
createContents(org.xbib.datastructures.xslx.jxl.biff.HeaderFooter.Contents c) {
return new Contents((Contents) c);
}
/**
* The contents - a simple wrapper around a string buffer
*/
public static class Contents extends jxl.biff.HeaderFooter.Contents {
public static class Contents extends org.xbib.datastructures.xslx.jxl.biff.HeaderFooter.Contents {
/**
* The constructor
*/

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.io.File;
import java.net.URL;

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.io.File;
import jxl.common.LengthUnit;
import org.xbib.datastructures.xslx.jxl.common.LengthUnit;
/**
* Accessor functions for an image

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* Base exception class for JExcelAPI exceptions

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A label cell

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.text.NumberFormat;

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A mixin interface for numerical formulas, which combines the interfaces

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* Represents a 3-D range of cells in a workbook. This object is

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.util.regex.Pattern;
import jxl.format.CellFormat;
import org.xbib.datastructures.xslx.jxl.format.CellFormat;
/**
* Represents a sheet within a workbook. Provides a handle to the individual

View file

@ -17,13 +17,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import jxl.biff.SheetRangeImpl;
import jxl.common.Assert;
import jxl.format.PageOrder;
import jxl.format.PageOrientation;
import jxl.format.PaperSize;
import org.xbib.datastructures.xslx.jxl.biff.SheetRangeImpl;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.format.PageOrder;
import org.xbib.datastructures.xslx.jxl.format.PageOrientation;
import org.xbib.datastructures.xslx.jxl.format.PaperSize;
/**
* This is a bean which client applications may use to get/set various

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
/**
* A mixin interface for numerical formulas, which combines the interfaces

View file

@ -17,19 +17,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import jxl.read.biff.BiffException;
import jxl.read.biff.File;
import jxl.read.biff.PasswordException;
import jxl.read.biff.WorkbookParser;
import jxl.write.WritableWorkbook;
import jxl.write.biff.WritableWorkbookImpl;
import org.xbib.datastructures.xslx.jxl.read.biff.BiffException;
import org.xbib.datastructures.xslx.jxl.read.biff.File;
import org.xbib.datastructures.xslx.jxl.read.biff.PasswordException;
import org.xbib.datastructures.xslx.jxl.read.biff.WorkbookParser;
import org.xbib.datastructures.xslx.jxl.write.WritableWorkbook;
import org.xbib.datastructures.xslx.jxl.write.biff.WritableWorkbookImpl;
/**
* Represents a Workbook. Contains the various factory methods and provides

View file

@ -17,14 +17,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl;
package org.xbib.datastructures.xslx.jxl;
import java.io.File;
import java.util.HashMap;
import java.util.Locale;
import jxl.biff.CountryCode;
import jxl.biff.formula.FunctionNames;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.biff.CountryCode;
import org.xbib.datastructures.xslx.jxl.biff.formula.FunctionNames;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* This is a bean which client applications may use to set various advanced

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.IOException;
import jxl.write.biff.File;
import org.xbib.datastructures.xslx.jxl.write.biff.File;
/**
* Information for autofiltering

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Range information for conditional formatting

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Range information for conditional formatting

View file

@ -17,16 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.util.Collection;
import jxl.CellReferenceHelper;
import jxl.Range;
import jxl.biff.drawing.ComboBox;
import jxl.biff.drawing.Comment;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.write.biff.CellValue;
import org.xbib.datastructures.xslx.jxl.CellReferenceHelper;
import org.xbib.datastructures.xslx.jxl.Range;
import org.xbib.datastructures.xslx.jxl.biff.drawing.ComboBox;
import org.xbib.datastructures.xslx.jxl.biff.drawing.Comment;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.write.biff.CellValue;
/**
* Container for any additional cell features

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Assert;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Contains the common data for a compound file

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.format.Format;
import org.xbib.datastructures.xslx.jxl.format.Format;
/**
* The excel string for the various built in formats. Used to present

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Enumeration of built in names

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Represents a built in, rather than a user defined, style.

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* A growable array of bytes

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Interface which provides a method for transferring chunks of binary

View file

@ -17,14 +17,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import jxl.Cell;
import jxl.CellType;
import jxl.LabelCell;
import jxl.Sheet;
import org.xbib.datastructures.xslx.jxl.Cell;
import org.xbib.datastructures.xslx.jxl.CellType;
import org.xbib.datastructures.xslx.jxl.LabelCell;
import org.xbib.datastructures.xslx.jxl.Sheet;
/**
* Refactorisation to provide more sophisticated find cell by contents

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.biff.formula.ExternalSheet;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.biff.formula.ExternalSheet;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* A helper to transform between excel cell references and

View file

@ -17,12 +17,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import jxl.write.biff.File;
import org.xbib.datastructures.xslx.jxl.write.biff.File;
/**
* Class containing the CONDFMT and CF records for conditionally formatting

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Range information for conditional formatting

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* The conditional format conditions

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A continue record - only used explicitly in special circumstances, as

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Enumeration type for the excel country codes

View file

@ -17,19 +17,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.text.DecimalFormat;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.Iterator;
import jxl.WorkbookSettings;
import jxl.biff.formula.ExternalSheet;
import jxl.biff.formula.FormulaException;
import jxl.biff.formula.FormulaParser;
import jxl.biff.formula.ParseContext;
import jxl.common.Assert;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.biff.formula.ExternalSheet;
import org.xbib.datastructures.xslx.jxl.biff.formula.FormulaException;
import org.xbib.datastructures.xslx.jxl.biff.formula.FormulaParser;
import org.xbib.datastructures.xslx.jxl.biff.formula.ParseContext;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Class which parses the binary data associated with Data Validity (DV)

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Class which parses the binary data associated with Data Validity (DVal)

View file

@ -17,16 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import jxl.WorkbookSettings;
import jxl.biff.formula.ExternalSheet;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.write.biff.File;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.biff.formula.ExternalSheet;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.write.biff.File;
/**

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Record containing the list of data validation settings for a given sheet

View file

@ -17,14 +17,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.WorkbookSettings;
import jxl.biff.formula.ExternalSheet;
import jxl.biff.formula.FormulaException;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.biff.formula.ExternalSheet;
import org.xbib.datastructures.xslx.jxl.biff.formula.FormulaException;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Data validity settings. Contains an individual Data validation (DV).

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* The interface implemented by the various number and date format styles.

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Class to help handle doubles

View file

@ -17,17 +17,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.CellFeatures;
import jxl.CellType;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.format.CellFormat;
import jxl.format.VerticalAlignment;
import jxl.write.WritableCell;
import jxl.write.WritableCellFeatures;
import org.xbib.datastructures.xslx.jxl.CellFeatures;
import org.xbib.datastructures.xslx.jxl.CellType;
import org.xbib.datastructures.xslx.jxl.format.Alignment;
import org.xbib.datastructures.xslx.jxl.format.Border;
import org.xbib.datastructures.xslx.jxl.format.BorderLineStyle;
import org.xbib.datastructures.xslx.jxl.format.CellFormat;
import org.xbib.datastructures.xslx.jxl.format.VerticalAlignment;
import org.xbib.datastructures.xslx.jxl.write.WritableCell;
import org.xbib.datastructures.xslx.jxl.write.WritableCellFeatures;
/**
* An empty cell. Represents an empty, as opposed to a blank cell
@ -107,15 +107,6 @@ public class EmptyCell implements WritableCell {
public void setCellFormat(CellFormat cf) {
}
/**
* Dummy override
*
* @param cf dummy
* @deprecated
*/
public void setCellFormat(jxl.CellFormat cf) {
}
/**
* Dummy override
*

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.WorkbookSettings;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Helper to get the Microsoft encoded URL from the given string

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Range information for conditional formatting

View file

@ -17,16 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.WorkbookSettings;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.format.Colour;
import jxl.format.Font;
import jxl.format.ScriptStyle;
import jxl.format.UnderlineStyle;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.format.Colour;
import org.xbib.datastructures.xslx.jxl.format.Font;
import org.xbib.datastructures.xslx.jxl.format.ScriptStyle;
import org.xbib.datastructures.xslx.jxl.format.UnderlineStyle;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A record containing the necessary data for the font information

View file

@ -17,13 +17,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import jxl.common.Assert;
import jxl.write.biff.File;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.write.biff.File;
/**
* A container for the list of fonts used in this workbook

View file

@ -17,16 +17,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import jxl.WorkbookSettings;
import jxl.common.Logger;
import jxl.format.Format;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.format.Format;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A non-built in format record

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.IOException;
import java.text.DateFormat;
@ -25,11 +25,11 @@ import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.format.Colour;
import jxl.format.RGB;
import jxl.write.biff.File;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.format.Colour;
import org.xbib.datastructures.xslx.jxl.format.RGB;
import org.xbib.datastructures.xslx.jxl.write.biff.File;
/**
* The list of XF records and formatting records for the workbook

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.Cell;
import jxl.biff.formula.FormulaException;
import org.xbib.datastructures.xslx.jxl.Cell;
import org.xbib.datastructures.xslx.jxl.biff.formula.FormulaException;
/**
* Interface which is used for copying formulas from a read only

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Class which represents an Excel header or footer. Information for this

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* This class is a wrapper for a list of mappings between indices.

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Converts excel byte representations into integers

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.JXLException;
import org.xbib.datastructures.xslx.jxl.JXLException;
/**
* A properly typed exception in case consumers of the API specifically

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* Excel places a constraint on the number of format records that

View file

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.format.Colour;
import jxl.format.RGB;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.format.Colour;
import org.xbib.datastructures.xslx.jxl.format.RGB;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A record representing the RGB colour palette

View file

@ -17,12 +17,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.Cell;
import jxl.Range;
import jxl.Sheet;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.Cell;
import org.xbib.datastructures.xslx.jxl.Range;
import org.xbib.datastructures.xslx.jxl.Sheet;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Implementation class for the Range interface. This merely

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* The record data within a record

View file

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.Cell;
import jxl.Range;
import jxl.Sheet;
import org.xbib.datastructures.xslx.jxl.Cell;
import org.xbib.datastructures.xslx.jxl.Range;
import org.xbib.datastructures.xslx.jxl.Sheet;
/**
* Implementation class for the Range interface. This merely

View file

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.io.UnsupportedEncodingException;
import jxl.WorkbookSettings;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* Helper function to convert Java string objects to and from the byte

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
/**
* An enumeration class which contains the biff types

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.Sheet;
import org.xbib.datastructures.xslx.jxl.Sheet;
/**
* An interface containing some common workbook methods. This so that

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A record detailing whether the sheet is protected

View file

@ -17,10 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.common.Logger;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Extension of the standard RecordData which is used to support those

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* A record representing the XCT record

View file

@ -18,27 +18,27 @@
***************************************************************************/
package jxl.biff;
package org.xbib.datastructures.xslx.jxl.biff;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import jxl.WorkbookSettings;
import jxl.common.Assert;
import jxl.common.Logger;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.format.CellFormat;
import jxl.format.Colour;
import jxl.format.Font;
import jxl.format.Format;
import jxl.format.Orientation;
import jxl.format.Pattern;
import jxl.format.VerticalAlignment;
import jxl.read.biff.Record;
import org.xbib.datastructures.xslx.jxl.WorkbookSettings;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.format.Alignment;
import org.xbib.datastructures.xslx.jxl.format.Border;
import org.xbib.datastructures.xslx.jxl.format.BorderLineStyle;
import org.xbib.datastructures.xslx.jxl.format.CellFormat;
import org.xbib.datastructures.xslx.jxl.format.Colour;
import org.xbib.datastructures.xslx.jxl.format.Font;
import org.xbib.datastructures.xslx.jxl.format.Format;
import org.xbib.datastructures.xslx.jxl.format.Orientation;
import org.xbib.datastructures.xslx.jxl.format.Pattern;
import org.xbib.datastructures.xslx.jxl.format.VerticalAlignment;
import org.xbib.datastructures.xslx.jxl.read.biff.Record;
/**
* Holds an extended formatting record

View file

@ -17,9 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff.drawing;
package org.xbib.datastructures.xslx.jxl.biff.drawing;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* A BStoreContainer escher record

View file

@ -17,12 +17,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff.drawing;
package org.xbib.datastructures.xslx.jxl.biff.drawing;
import java.io.IOException;
import jxl.biff.IntegerHelper;
import jxl.common.Assert;
import jxl.common.Logger;
import org.xbib.datastructures.xslx.jxl.biff.IntegerHelper;
import org.xbib.datastructures.xslx.jxl.common.Assert;
import org.xbib.datastructures.xslx.jxl.common.Logger;
/**
* The data for this blip store entry. Typically this is the raw image data

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/
package jxl.biff.drawing;
package org.xbib.datastructures.xslx.jxl.biff.drawing;
/**
* Enumeration for the BLIP type

Some files were not shown because too many files have changed in this diff Show more