Пример #1
0
        /**
         * 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");
            }
        }
Пример #2
0
 /**
  * Constructor for internal sheets
  */
 public SupbookRecord(int sheets, WorkbookSettings ws)
     : base(Type.SUPBOOK)
 {
     numSheets        = sheets;
     type             = INTERNAL;
     workbookSettings = ws;
 }
Пример #3
0
        /**
         * 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;
        }
Пример #4
0
        /**
         * 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;
        }
Пример #5
0
 /**
  * Constructor for internal sheets
  */
 public SupbookRecord(int sheets, WorkbookSettings ws)
     : base(Type.SUPBOOK)
 {
     numSheets = sheets;
     type = INTERNAL;
     workbookSettings = ws;
 }
Пример #6
0
 /**
  * Constructor for add in function names
  */
 public SupbookRecord()
     : base(Type.SUPBOOK)
 {
     type = ADDIN;
 }
Пример #7
0
        /**
         * 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;
        }
Пример #8
0
        /**
         * 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");
                }
        }
Пример #9
0
        /**
         * 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;
        }
Пример #10
0
 /**
  * Constructor for add in function names
  */
 public SupbookRecord()
     : base(Type.SUPBOOK)
 {
     type = ADDIN;
 }