当前位置: 首页>>代码示例>>Java>>正文


Java LabelSSTRecord.sid方法代码示例

本文整理汇总了Java中org.apache.poi.hssf.record.LabelSSTRecord.sid方法的典型用法代码示例。如果您正苦于以下问题:Java LabelSSTRecord.sid方法的具体用法?Java LabelSSTRecord.sid怎么用?Java LabelSSTRecord.sid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.poi.hssf.record.LabelSSTRecord的用法示例。


在下文中一共展示了LabelSSTRecord.sid方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isRowBlockRecord

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
static boolean isRowBlockRecord(int sid) {
  switch (sid) {
    case RowRecord.sid:

    case BlankRecord.sid:
    case BoolErrRecord.sid:
    case FormulaRecord.sid:
    case LabelRecord.sid:
    case LabelSSTRecord.sid:
    case NumberRecord.sid:
    case RKRecord.sid:

    case ArrayRecord.sid:
    case SharedFormulaRecord.sid:
    case TableRecord.sid:
      return true;
  }
  return false;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:20,代码来源:RowBlock.java

示例2: getValorLido

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
/**
 * Recuper �ltimo valor lido pelo cabe�ote de leitura do XLS
 * @return
 */
protected String getValorLido() {
	String valorLido="";
	 
	if(xlsRecordAtual.getSid()== LabelSSTRecord.sid){
		LabelSSTRecord labelSSTRecord = (LabelSSTRecord) xlsRecordAtual;
		valorLido = sstrec.getString(labelSSTRecord.getSSTIndex()).toString();
		
	}else if(xlsRecordAtual.getSid() == NumberRecord.sid){
		NumberRecord numberRecord = (NumberRecord) xlsRecordAtual;
		valorLido = converteDedoubleParaString(numberRecord);
	}else{
		
		log.warn("Atencao. A colula, linha nao pode ser lida!");
	}
	return valorLido;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:21,代码来源:LeitorXLSCliente.java

示例3: getValorLido

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
/**
 * Recuper �ltimo valor lido pelo cabe�ote de leitura do XLS
 * @return
 */
protected String getValorLido() {
	String valorLido="";
	
	if(xlsRecordAtual.getSid()== LabelSSTRecord.sid){
		LabelSSTRecord labelSSTRecord = (LabelSSTRecord) xlsRecordAtual;
		valorLido = sstrec.getString(labelSSTRecord.getSSTIndex()).toString();
		
	}else if(xlsRecordAtual.getSid() == NumberRecord.sid){
		NumberRecord numberRecord = (NumberRecord) xlsRecordAtual;
		
		valorLido = ""+numberRecord.getValue();
	}else{
		
		log.warn("Atencao. A colula, linha nao pode ser lida!");
	}
	return valorLido;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:22,代码来源:VerificadorXLSCliente.java

示例4: getLinhaAtual

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
/**
 * Recupera linha atual a partir do recor que acabou de ser lifo
 * @return
 * @throws ControlePosicaoXLSException
 */
protected int getLinhaAtual() throws ControlePosicaoXLSException{
	
	
	if(this.xlsRecordAtual.getSid()== LabelSSTRecord.sid){
		LabelSSTRecord labelSSTRecord = (LabelSSTRecord) this.xlsRecordAtual;
		return labelSSTRecord.getRow();			
	}else if(this.xlsRecordAtual.getSid() == NumberRecord.sid){
		NumberRecord numberRecord = (NumberRecord) this.xlsRecordAtual;
		return numberRecord.getRow();			
	}
	
	throw new ControlePosicaoXLSException("O record atual n�o cont�m informacoes sobre linha e coluna!");
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:19,代码来源:LeitorXLSCliente.java

示例5: getColunaAtual

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
/**
 * Recupera coluna atual a partir do record que acabou de ser lido
 * @return
 * @throws ControlePosicaoXLSException caso o record atual n�o permita leitura de coluna e linha
 */
protected short getColunaAtual() throws ControlePosicaoXLSException {
	if(xlsRecordAtual.getSid()== LabelSSTRecord.sid){
		LabelSSTRecord labelSSTRecord = (LabelSSTRecord) xlsRecordAtual;
		return labelSSTRecord.getColumn();
		
	}else if(xlsRecordAtual.getSid() == NumberRecord.sid){
		NumberRecord numberRecord = (NumberRecord) xlsRecordAtual;
		return numberRecord.getColumn();
	}
	
	throw new ControlePosicaoXLSException("O record atual n�o cont�m informacoes sobre linha e coluna!");
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:18,代码来源:LeitorXLSCliente.java

示例6: isPermiteLerLinhaColuna

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
/**
 * Verifica se o Record atual permite ler informa��es sobre linha e coluna
 * @return
 */
protected boolean isPermiteLerLinhaColuna() {
	// Apenas os tipos LabelSSTRecord e NumberRecord permitem ler linha e coluna 
	return 
	this.xlsRecordAtual.getSid()==LabelSSTRecord.sid || 
	this.xlsRecordAtual.getSid() ==NumberRecord.sid;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:11,代码来源:LeitorXLSCliente.java

示例7: isEmpty

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
private boolean isEmpty(Record record) {
    short sid = record.getSid();
    if(LabelSSTRecord.sid == sid) {
        String str = sstRecord.getString(((LabelSSTRecord)record).getSSTIndex()).getString();
        return str==null || str.length()==0;
    }
    return false;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:9,代码来源:XlsTableReader.java

示例8: recordFound

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
@Override
protected void recordFound(Record record) throws Exception {
    if(tableEnded)
        return;
    
    switch(record.getSid()) {
        case BoundSheetRecord.sid:
            boundRecord((BoundSheetRecord) record);
            break;
        case BOFRecord.sid:
            bofRecord((BOFRecord)record);
            break;
        case SSTRecord.sid:
            sstRecord = (SSTRecord) record;
            break;
        case BoolErrRecord.sid:
            cellRecord((CellRecord)record);
            break;
        case FormulaRecord.sid:
            cellRecord((CellRecord)record);
            break;
        case LabelSSTRecord.sid:
            cellRecord((CellRecord)record);
            break;
        case LabelRecord.sid:
            LabelRecord lr = (LabelRecord) record;
            cellRecord(lr.getRow(), lr.getColumn(), lr);
            break;
        case StringRecord.sid:
            if(outputNextString) {
                cellRecord(prevRow, prevColumn, record);
                outputNextString = false;
            }
            break;
        case NumberRecord.sid:
            cellRecord((CellRecord)record);
            break;
        default:
            break;
    }
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:42,代码来源:XlsTableReader.java

示例9: cellRecord

import org.apache.poi.hssf.record.LabelSSTRecord; //导入方法依赖的package包/类
private void cellRecord(int row, short column, Record record) throws Exception {
    try {
        //Not on the good sheet, before first row/column
        if(!onReferencedSheet || firstRow > row || firstColumn > column)
            return;
    
        //The cell is empty, do not read it
        boolean isEmptyCell = isEmpty(record);
        if(isEmptyCell) {
            //If first cell is empty, whole table is empty
            if(firstRow==row && firstColumn == column)
                lastColumn = (short)(firstColumn - 1);
            return;
        }

        //Calculate the last column, based on the first row
        if(firstRow == row) {
            //If we missed a cell, do not read other columns
            if((column - lastColumn) < 2)
                lastColumn = column;
        }

        //after the last column
        if(column > lastColumn)
            return;

        if(column == firstColumn)
            prevColumn = firstColumn;

        //missed a row, do not read further
        if((row - prevRow)> 1 || (column-prevColumn)>1)
            return;

        short sid = record.getSid();
        switch(sid) {
            case NumberRecord.sid:
                factory.numberFound(row, column, ((NumberRecord)record).getValue());
                break;
            case LabelSSTRecord.sid:
                if(sstRecord == null)
                    throw new IllegalArgumentException("SSTRecord is null");
                int stringId = ((LabelSSTRecord)record).getSSTIndex();
                String str = sstRecord.getString(stringId).getString();
                factory.stringFound(row, column, str);
                break;
            case LabelRecord.sid:
                factory.stringFound(row, column, ((LabelRecord)record).getValue());
                break;
            case StringRecord.sid:
                factory.stringFound(row, column, ((StringRecord)record).getString());
                break;
            case FormulaRecord.sid:
                FormulaRecord fr = (FormulaRecord) record;
                if(fr.hasCachedResultString()) {
                    outputNextString = true;
                } else {
                    factory.numberFound(row, column, fr.getValue());
                }
                break;
            case BoolErrRecord.sid:
                BoolErrRecord ber = (BoolErrRecord) record;
                if(ber.isBoolean()) {
                    factory.booleanFound(row, column, ber.getBooleanValue());
                } else {
                    factory.errorFound(row, column, getErrorMsg(ber.getErrorValue()));
                }
                break;
            default:
                break;
        }

        prevRow = row;
        prevColumn = column;
    } catch (Exception ex) {
        CellReference ref = new CellReference(sheetName, row, column, false, false);
        throw new ExcelReadException(ref, ex);
    }
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:79,代码来源:XlsTableReader.java


注:本文中的org.apache.poi.hssf.record.LabelSSTRecord.sid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。