Пример #1
0
        public XlsWorksheet(XlsWorkbook workbook, XlsBiffBoundSheet refSheet, byte[] bytes)
        {
            Workbook = workbook;
            Bytes    = bytes;

            IsDate1904      = workbook.IsDate1904;
            Formats         = new Dictionary <ushort, XlsBiffFormatString>(workbook.Formats);
            ExtendedFormats = new List <XlsBiffRecord>(workbook.ExtendedFormats);
            Encoding        = workbook.Encoding;

            Name       = refSheet.GetSheetName(workbook.Encoding);
            DataOffset = refSheet.StartOffset;

            switch (refSheet.VisibleState)
            {
            case XlsBiffBoundSheet.SheetVisibility.Hidden:
                VisibleState = "hidden";
                break;

            case XlsBiffBoundSheet.SheetVisibility.VeryHidden:
                VisibleState = "veryhidden";
                break;

            default:
                VisibleState = "visible";
                break;
            }

            ReadWorksheetGlobals();
        }
Пример #2
0
        public XlsWorksheet(XlsWorkbook workbook, XlsBiffBoundSheet refSheet, Stream stream)
        {
            Workbook = workbook;
            Stream   = stream;

            IsDate1904       = workbook.IsDate1904;
            Formats          = new Dictionary <ushort, XlsBiffFormatString>(workbook.Formats);
            ExtendedFormats  = new List <XlsBiffRecord>(workbook.ExtendedFormats);
            Encoding         = workbook.Encoding;
            RowMinMaxOffsets = new Dictionary <int, KeyValuePair <int, int> >();
            DefaultRowHeight = 255; // 12.75 points

            Name       = refSheet.GetSheetName(workbook.Encoding);
            DataOffset = refSheet.StartOffset;

            switch (refSheet.VisibleState)
            {
            case XlsBiffBoundSheet.SheetVisibility.Hidden:
                VisibleState = "hidden";
                break;

            case XlsBiffBoundSheet.SheetVisibility.VeryHidden:
                VisibleState = "veryhidden";
                break;

            default:
                VisibleState = "visible";
                break;
            }

            ReadWorksheetGlobals();
        }
Пример #3
0
        public XlsWorksheet(XlsWorkbook workbook, XlsBiffBoundSheet refSheet, Stream stream)
        {
            Workbook = workbook;
            Stream   = stream;

            IsDate1904       = workbook.IsDate1904;
            Encoding         = workbook.Encoding;
            RowOffsetMap     = new Dictionary <int, XlsRowOffset>();
            DefaultRowHeight = 255; // 12.75 points

            Name       = refSheet.GetSheetName(workbook.Encoding);
            DataOffset = refSheet.StartOffset;

            switch (refSheet.VisibleState)
            {
            case XlsBiffBoundSheet.SheetVisibility.Hidden:
                VisibleState = "hidden";
                break;

            case XlsBiffBoundSheet.SheetVisibility.VeryHidden:
                VisibleState = "veryhidden";
                break;

            default:
                VisibleState = "visible";
                break;
            }

            ReadWorksheetGlobals();
        }