org.jeecgframework.poi.excel.entity.enmus.CellValueType Java Examples

The following examples show how to use org.jeecgframework.poi.excel.entity.enmus.CellValueType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SheetHandler.java    From autopoi with Apache License 2.0 6 votes vote down vote up
@Override
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
	// 置空
	lastContents = "";
	// c => 单元格
	if ("c".equals(name)) {
		// 如果下一个元素是 SST 的索引,则将nextIsString标记为true
		String cellType = attributes.getValue("t");
		if ("s".equals(cellType)) {
			type = CellValueType.String;
			return;
		}
		// 日期格式
		cellType = attributes.getValue("s");
		if ("1".equals(cellType)) {
			type = CellValueType.Date;
		} else if ("2".equals(cellType)) {
			type = CellValueType.Number;
		}
	} else if ("t".equals(name)) {// 当元素为t时
		type = CellValueType.TElement;
	}

}
 
Example #2
Source File: SheetHandler.java    From jeasypoi with Apache License 2.0 6 votes vote down vote up
@Override
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
	// 置空
	lastContents = "";
	// c => 单元格
	if ("c".equals(name)) {
		// 如果下一个元素是 SST 的索引,则将nextIsString标记为true
		String cellType = attributes.getValue("t");
		if ("s".equals(cellType)) {
			type = CellValueType.String;
			return;
		}
		// 日期格式
		cellType = attributes.getValue("s");
		if ("1".equals(cellType)) {
			type = CellValueType.Date;
		} else if ("2".equals(cellType)) {
			type = CellValueType.Number;
		}
	} else if ("t".equals(name)) {// 当元素为t时
		type = CellValueType.TElement;
	}

}
 
Example #3
Source File: SheetHandler.java    From easypoi with Apache License 2.0 6 votes vote down vote up
@Override
public void startElement(String uri, String localName, String name, Attributes attributes)
                                                                                          throws SAXException {
    // 置空  
    lastContents = "";
    // c => 单元格  
    if ("c".equals(name)) {
        // 如果下一个元素是 SST 的索引,则将nextIsString标记为true  
        String cellType = attributes.getValue("t");
        if ("s".equals(cellType)) {
            type = CellValueType.String;
            return;
        }
        //日期格式  
        cellType = attributes.getValue("s");
        if ("1".equals(cellType)) {
            type = CellValueType.Date;
        } else if ("2".equals(cellType)) {
            type = CellValueType.Number;
        }
    } else if ("t".equals(name)) {//当元素为t时  
        type = CellValueType.TElement;
    }

}
 
Example #4
Source File: SaxReadCellEntity.java    From autopoi with Apache License 2.0 4 votes vote down vote up
public SaxReadCellEntity(CellValueType cellType, Object value) {
	this.cellType = cellType;
	this.value = value;
}
 
Example #5
Source File: SaxReadCellEntity.java    From autopoi with Apache License 2.0 4 votes vote down vote up
public CellValueType getCellType() {
	return cellType;
}
 
Example #6
Source File: SaxReadCellEntity.java    From autopoi with Apache License 2.0 4 votes vote down vote up
public void setCellType(CellValueType cellType) {
	this.cellType = cellType;
}
 
Example #7
Source File: SaxReadCellEntity.java    From jeasypoi with Apache License 2.0 4 votes vote down vote up
public SaxReadCellEntity(CellValueType cellType, Object value) {
	this.cellType = cellType;
	this.value = value;
}
 
Example #8
Source File: SaxReadCellEntity.java    From jeasypoi with Apache License 2.0 4 votes vote down vote up
public CellValueType getCellType() {
	return cellType;
}
 
Example #9
Source File: SaxReadCellEntity.java    From jeasypoi with Apache License 2.0 4 votes vote down vote up
public void setCellType(CellValueType cellType) {
	this.cellType = cellType;
}
 
Example #10
Source File: SaxReadCellEntity.java    From easypoi with Apache License 2.0 4 votes vote down vote up
public SaxReadCellEntity(CellValueType cellType, Object value) {
    this.cellType = cellType;
    this.value = value;
}
 
Example #11
Source File: SaxReadCellEntity.java    From easypoi with Apache License 2.0 4 votes vote down vote up
public CellValueType getCellType() {
    return cellType;
}
 
Example #12
Source File: SaxReadCellEntity.java    From easypoi with Apache License 2.0 4 votes vote down vote up
public void setCellType(CellValueType cellType) {
    this.cellType = cellType;
}