com.scudata.excel.SheetHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.excel;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.RichTextString;
import org.apache.poi.xssf.model.SharedStrings;
import org.apache.poi.xssf.model.SharedStringsTable;
import org.apache.poi.xssf.model.StylesTable;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import com.scudata.common.MessageManager;
import com.scudata.common.RQException;
import com.scudata.dm.DataStruct;
import com.scudata.dm.cursor.ICursor;
import com.scudata.resources.EngineMessage;
import com.scudata.util.Variant;
/**
* Read excel file in xlsx format
*
*/
public class SheetHandler extends DefaultHandler {
/**
* SharedStringsTable object
*/
private final SharedStrings sst;
/**
* StylesTable object
*/
private final StylesTable styles;
/**
* Cached value
*/
private String lastContents;
/**
* Cell type
*/
private String cellType;
/**
* Whether inlineStr cell
*/
private boolean inlineStr;
/**
* Map for caching rich text
*/
private final LruCache lruCache = new LruCache(
50);
/**
* Row of data
*/
private Object[] rowData = new Object[255];
/**
* Current Row
*/
private int row = -1;
/**
* Current Column
*/
private int col = 0;
/**
* End column
*/
private int endCol = 0;
/**
* DataStruct
*/
private DataStruct ds = null;
/**
* Field indexes
*/
private int[] indexes = null;
/**
* Cell style
*/
private String style = null;
/**
* Number of columns
*/
private int colCount = 0;
/**
* Field names
*/
private String[] fields;
/**
* Start row
*/
private int startRow = 0;
/**
* End row
*/
private int endRow = 0;
/**
* Whether to remove blank lines at the beginning and end
*/
private boolean removeBlank = false;
/**
* The object that marks the end
*/
public static final Boolean ENDING_OBJECT = Boolean.FALSE;
/**
* The queue used to cache data
*/
private ArrayBlockingQueue
© 2015 - 2024 Weber Informatics LLC | Privacy Policy