Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.StringRecord


  public void setCachedStringResult(String value) {

    // Save the string into a String Record, creating one if required
    if(_stringRecord == null) {
      _stringRecord = new StringRecord();
    }
    _stringRecord.setString(value);
    if (value.length() < 1) {
      _formulaRecord.setCachedResultTypeEmptyString();
    } else {
View Full Code Here


   
    row = new RowRecord();
    row.setRowNumber(1);
    records.add(row);

    records.add(new StringRecord());
   
    row = new RowRecord();
    row.setRowNumber(2);
    records.add(row);
   
View Full Code Here

   
    row = new RowRecord();
    row.setRowNumber(1);
    records.add(row);

    records.add(new StringRecord());
   
    row = new RowRecord();
    row.setRowNumber(2);
    records.add(row);
   
View Full Code Here

                break;
               
            case StringRecord.sid:
                if (previousSid == FormulaRecord.sid) {
                   // Cached string value of a string formula
                   StringRecord sr = (StringRecord) record;
                   addTextCell(stringFormulaRecord, sr.getString());
                } else {
                   // Some other string not associated with a cell, skip
                }
                break;
View Full Code Here

                            break;
                        case StringRecord.sid:
                            if (readingTargetSheet) {
                                if (keyForNextStringRecord != null) {
                                    // String for formula
                                    final StringRecord rec = (StringRecord) record;
                                    final String val = rec.getString();
                                    resultMap.put(keyForNextStringRecord, val);
                                    keyForNextStringRecord = null;
                                }
                            }
                            break;
                        case LabelRecord.sid:
                            if (readingTargetSheet) {
                                final LabelRecord rec = (LabelRecord) record;
                                readCellValues(rec.getRow(), rec.getColumn(), rec.getValue());
                            }
                            break;
                        case LabelSSTRecord.sid:
                            if (readingTargetSheet) {
                                final LabelSSTRecord rec = (LabelSSTRecord) record;
                                final String val = sstrec.getString(rec.getSSTIndex()).toString();
                                readCellValues(rec.getRow(), rec.getColumn(), val);
                            }
                            break;
                        case NumberRecord.sid:
                            if (readingTargetSheet) {
                                final NumberRecord rec = (NumberRecord) record;
                                final double val = rec.getValue();
                                readCellValues(rec.getRow(), rec.getColumn(), String.valueOf(val));
                            }
                            break;
                        case EOFRecord.sid:
                            if (readingTargetSheet && readingDataRow) {
                                queueRowData(null, true);
View Full Code Here

        records.add(new RowRecord(0));
        records.add(new RowRecord(1));
        FormulaRecord formulaRecord = new FormulaRecord();
        formulaRecord.setCachedResultTypeString();
    records.add(formulaRecord);
        records.add(new StringRecord());
        records.add(new RowRecord(2));
        records.add(createWindow2Record());
        records.add(EOFRecord.instance);

        Sheet sheet = Sheet.createSheet(records, 0);
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.StringRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.