public static AbsXLSRec Read(BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) { int code = br.ReadUInt16(); if (code == 0) { return(null); } int size = br.ReadUInt16(); XLSDescriptor byCode = XLSDescriptors.GetByCode(code); if (!XLSDescriptors.ValidBodySize(byCode, size, false)) { byCode = null; } if ((byCode != null) && (byCode.Name == "FILEPASS")) { throw new Exception("Current version of ebexcel can't read encrypted workbooks. You can use only simple password protection against modifying (set in MS Excel 'Save As' dialog)."); } if ((byCode != null) && (byCode.HandlerClass != typeof(XLSRecord))) { return((AbsXLSRec)Activator.CreateInstance(byCode.HandlerClass, new object[] { size, br, previousRecord, operationInfo })); } return(new XLSRecord(code, size, br)); }
public SSTRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { object[] arguments = base.GetArguments(); this.TotalStringCount = (int)((uint)arguments[0]); this.UniqueStringCount = (int)((uint)arguments[1]); base.ExcelStrings = (ExcelLongStrings)arguments[2]; }
public void Read(BinaryReader br, IoOperationInfo operationInfo) { AbsXLSRec previousRecord = null; Label_0002: if (br.PeekChar() != -1) { try { previousRecord = AbsXLSRec.Read(br, previousRecord, operationInfo); } catch (Exception exception) { string message = exception.Message; } while (previousRecord != null) { this.Add(previousRecord); goto Label_0002; } } }
public ObjRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.items = new ArrayList(); }
public Window2Record(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) { this.window2Options = (WorksheetWindowOptions)br.ReadUInt16(); this.firstRow = br.ReadUInt16(); this.firstColumn = br.ReadUInt16(); if (bodyLength == 18) { this.smallRecord = false; br.ReadUInt16(); br.ReadUInt16(); this.pageBreakViewZoom = br.ReadUInt16(); this.zoom = br.ReadUInt16(); br.ReadUInt32(); } else { if (bodyLength != 10) { throw new Exception("Internal error: Window2 record of size " + this.BodySize); } this.smallRecord = true; br.ReadUInt32(); } }
public RowRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(bodyLength, br, previousRecord, operationInfo) { }
public ByteArrRec(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) { this.data = br.ReadBytes(this.GetDescriptor().BodySize); }
public BoundSheetRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.SheetName = (ExcelShortString)base.GetArguments()[3]; }
public IndexRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.FirstRow = -1; this.LastRowPlusOne = -1; this.DBCells = new ArrayList(); }
public HorizontalPageBreaksRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { }
public MsoBaseRecord(XLSDescriptor descriptor, int bodyLength, BinaryReader br, MsoType type, IoOperationInfo operationInfo) : base(descriptor, bodyLength, br) { this.type = (ushort)type; this.operationInfo = operationInfo; this.Read(br); }
public MsoDrawingGroupRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.continueTotalSize = 0; this.Read(bodyLength, br); }
public MsoDrawingRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.arguments = base.GetArguments(); this.Parent = this.arguments[0] as MsoContainerRecord; }
public DBCellRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { this.StartingCellsForRows = new ArrayList(); }
public PaletteRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { }
public MsoBitmapPictureRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br, MsoType.Bitmap, operationInfo) { this.loadedFromExcel = true; base.Instance = 1760; }
public RKRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) { this.Header = new CellRecordHeader(br); this.Val = br.ReadUInt32(); }
public ContinueRecord(int bodyLength, BinaryReader br, AbsXLSRec previousRecord, IoOperationInfo operationInfo) : base(staticDescriptor, bodyLength, br) { SSTRelated related = previousRecord as SSTRelated; if ((related != null) && (related.ExcelStrings != null)) { using (MemoryStream stream = new MemoryStream(this.Body)) { using (BinaryReader reader = new BinaryReader(stream, new UnicodeEncoding())) { base.ExcelStrings = new ExcelLongStrings(reader, bodyLength, related.ExcelStrings); } } } }