123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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 RecordCalcmode
- {
- public ushort opcode; // 0xD;
- public ushort length;
- public ushort auto;
- public ushort calc1;
- public ushort calc2;
- public ushort calcstandard;
- }
- internal class Calcmode : IRecords
- {
-
- RecordCalcmode calcmode;
- public Calcmode()
- {
- calcmode.opcode = 0xD;
- calcmode.length = 0x2;
- calcmode.auto = 0x1; // ÉèΪ×Ô¶¯
- //// Also add the Calc Count record
- calcmode.calc1 = 0xC;
- calcmode.calc2 = 0x2;
- calcmode.calcstandard = 0x64;
- }
- #region IRecords ³ÉÔ±
- public byte[] GetByte()
- {
- //byte[] b = new byte[11];
- //b[0] = (byte)calcmode.opcode;
- //b[2] = (byte)calcmode.length;
- //b[4] = 0x1; // set to automatic recalc
- //// Also add the Calc Count record
- //b[6] = 0xC;
- //b[8] = 0x2;
- //b[10] = 0x64; //100 is standard
- //return b;
- return Globals.GetStructToBytes(calcmode);
- }
- #endregion
- }
- }
|