REFERENCE: PG 334 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
@author Andrew C. Oliver (acoliver at apache dot org) @author Jason Height (jheight at chariot dot net dot au) @version 2.0-pre
457458459460461462463464465466467468469470471472473474475476477478479480481482483
frec.setRow(row); record = frec; break; case CELL_TYPE_NUMERIC : NumberRecord nrec = null; if (cellType != this.cellType) { nrec = new NumberRecord(); } else { nrec = ( NumberRecord ) record; } nrec.setColumn(getCellNum()); if (setValue) { nrec.setValue(getNumericCellValue()); } nrec.setXFIndex(( short ) cellStyle.getIndex()); nrec.setRow(row); record = nrec; break; case CELL_TYPE_STRING : LabelSSTRecord lrec = null;
236237238239240241242243244245246
this.sheet = sheet; switch (type) { case CELL_TYPE_NUMERIC : record = new NumberRecord(); (( NumberRecord ) record).setColumn(col); (( NumberRecord ) record).setRow(row); (( NumberRecord ) record).setValue(( short ) 0); (( NumberRecord ) record).setXFIndex(( short ) 0); break;
466467468469470471472473474475476477478479480481482483484485486487488489490491492
607608609610611612613614615616617618619620
*/ public void testMissingDims() { int rowIx = 5; int colIx = 6; NumberRecord nr = new NumberRecord(); nr.setRow(rowIx); nr.setColumn((short) colIx); nr.setValue(3.0); List<Record> inRecs = new ArrayList<Record>(); inRecs.add(BOFRecord.createSheetBOF()); inRecs.add(new RowRecord(rowIx)); inRecs.add(nr);
334335336337338339340341342343344345346347348349350351352353354355356357358359360
frec.setXFIndex(styleIndex); _record = frec; break; case CELL_TYPE_NUMERIC : NumberRecord nrec = null; if (cellType != _cellType) { nrec = new NumberRecord(); } else { nrec = ( NumberRecord ) _record; } nrec.setColumn(col); if (setValue) { nrec.setValue(getNumericCellValue()); } nrec.setXFIndex(styleIndex); nrec.setRow(row); _record = nrec; break; case CELL_TYPE_STRING : LabelSSTRecord lrec;
596597598599600601602603604605606607608609
3637383940414243444546
public final class TestRowBlocksReader extends TestCase { public void testAbnormalPivotTableRecords_bug46280() { int SXVIEW_SID = 0x00B0; Record[] inRecs = { new RowRecord(0), new NumberRecord(), // normally MSODRAWING(0x00EC) would come here before SXVIEW new UnknownRecord(SXVIEW_SID, "dummydata (SXVIEW: View Definition)".getBytes()), new WindowTwoRecord(), }; RecordStream rs = new RecordStream(Arrays.asList(inRecs), 0);
186187188189190191192193194195196197198199200201202
thisColumn = nrec.getColumn(); // TODO: Find object to match nrec.getShapeId() thisStr = '"' + "(TODO)" + '"'; break; case NumberRecord.sid: NumberRecord numrec = (NumberRecord) record; thisRow = numrec.getRow(); thisColumn = numrec.getColumn(); // Format thisStr = formatNumberDateCell(numrec, numrec.getValue()); break; case RKRecord.sid: RKRecord rkrec = (RKRecord) record; thisRow = rkrec.getRow();
222223224225226227228229230231232233234
NoteRecord nrec = (NoteRecord) record; thisRow = nrec.getRow(); // TODO: Find object to match nrec.getShapeId() break; case NumberRecord.sid: NumberRecord numrec = (NumberRecord) record; thisRow = numrec.getRow(); thisText = formatNumberDateCell(numrec, numrec.getValue()); break; default: break; }
131132133134135136137138139140141
* UnknownRecord} has the potential of being 'continued'. */ public void testUnknownContinue_bug46280() { Record[] inRecs = { new RowRecord(0), new NumberRecord(), new UnknownRecord(0x5555, "dummydata".getBytes()), new ContinueRecord("moredummydata".getBytes()), }; RecordStream rs = new RecordStream(Arrays.asList(inRecs), 0); RowRecordsAggregate rra;