/** * Constructor used when copying from an external workbook */ public SupbookRecord(CSharpJExcel.Jxl.Read.Biff.SupbookRecord sr, WorkbookSettings ws) : base(Type.SUPBOOK) { workbookSettings = ws; if (sr.getType() == SupbookRecord.INTERNAL) { type = INTERNAL; numSheets = sr.getNumberOfSheets(); } else if (sr.getType() == SupbookRecord.EXTERNAL) { type = EXTERNAL; numSheets = sr.getNumberOfSheets(); fileName = sr.getFileName(); sheetNames = new string[numSheets]; for (int i = 0; i < numSheets; i++) { sheetNames[i] = sr.getSheetName(i); } } if (sr.getType() == SupbookRecord.ADDIN) { //logger.warn("Supbook type is addin"); } }
/** * Constructor for internal sheets */ public SupbookRecord(int sheets, WorkbookSettings ws) : base(Type.SUPBOOK) { numSheets = sheets; type = INTERNAL; workbookSettings = ws; }
/** * Initializes an internal supbook record */ private void initInternal() { data = new byte[4]; IntegerHelper.getTwoBytes(numSheets, data, 0); data[2] = 0x1; data[3] = 0x4; type = INTERNAL; }
/** * Constructor for external sheets * * @param fn the filename of the external supbook * @param ws the workbook settings */ public SupbookRecord(string fn, WorkbookSettings ws) : base(Type.SUPBOOK) { fileName = fn; numSheets = 1; sheetNames = new string[0]; workbookSettings = ws; type = EXTERNAL; }
/** * Constructor for add in function names */ public SupbookRecord() : base(Type.SUPBOOK) { type = ADDIN; }
/** * Constructor used when copying from an external workbook */ public SupbookRecord(CSharpJExcel.Jxl.Read.Biff.SupbookRecord sr, WorkbookSettings ws) : base(Type.SUPBOOK) { workbookSettings = ws; if (sr.getType() == SupbookRecord.INTERNAL) { type = INTERNAL; numSheets = sr.getNumberOfSheets(); } else if (sr.getType() == SupbookRecord.EXTERNAL) { type = EXTERNAL; numSheets = sr.getNumberOfSheets(); fileName = sr.getFileName(); sheetNames = new string[numSheets]; for (int i = 0; i < numSheets; i++) sheetNames[i] = sr.getSheetName(i); } if (sr.getType() == SupbookRecord.ADDIN) { //logger.warn("Supbook type is addin"); } }