using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using Biff8Excel.Interfaces; namespace Biff8Excel.Records { [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)] struct RecordBOF { public ushort opcode; // 0x809; public ushort length; // 0x10; public ushort version; // 0x600; public EnumBofTypes type; public ushort build; // 0x27F3; public ushort year; // 0x7CD; //1997 public uint history; // 0x40C9; public uint rversion; // 0x106; } internal enum EnumBofTypes : ushort { bofWorkbook = 0x5, bofWorkSheet = 0x10 } internal class BOF : IRecords { RecordBOF bof; public BOF() { bof.opcode = 0x809; bof.length = 0x10; bof.type = EnumBofTypes.bofWorkbook ; bof.version = 0x600; bof.year = 0x7CD; bof.build = 0x27F3; bof.history = 0x40C9; bof.rversion = 0x106; //bof.build = 0x19A0; //bof.history = 0xC0; //bof.rversion = 0x306; } internal EnumBofTypes DataType { set{ bof.type = value;} } internal ushort Id { get{return bof.opcode ;} } #region IRecords ³ΙΤ± public byte[] GetByte() { return Globals.GetStructToBytes(bof); } #endregion } }