Exemplo n.º 1
0
 public XLWorkbook(XLEventTracking eventTracking)
 {
     EventTracking      = eventTracking;
     DefaultRowHeight   = 15;
     DefaultColumnWidth = 8.43;
     Style          = new XLStyle(null, DefaultStyle);
     RowHeight      = DefaultRowHeight;
     ColumnWidth    = DefaultColumnWidth;
     PageOptions    = DefaultPageOptions;
     Outline        = DefaultOutline;
     Properties     = new XLWorkbookProperties();
     CalculateMode  = XLCalculateMode.Default;
     ReferenceStyle = XLReferenceStyle.Default;
     InitializeTheme();
     ShowFormulas       = DefaultShowFormulas;
     ShowGridLines      = DefaultShowGridLines;
     ShowOutlineSymbols = DefaultShowOutlineSymbols;
     ShowRowColHeaders  = DefaultShowRowColHeaders;
     ShowRuler          = DefaultShowRuler;
     ShowWhiteSpace     = DefaultShowWhiteSpace;
     ShowZeros          = DefaultShowZeros;
     RightToLeft        = DefaultRightToLeft;
     WorksheetsInternal = new XLWorksheets(this);
     NamedRanges        = new XLNamedRanges(this);
     CustomProperties   = new XLCustomProperties(this);
     ShapeIdManager     = new XLIdManager();
     Author             = Environment.UserName;
 }
Exemplo n.º 2
0
        public Boolean TryGetWorksheet(String name, out IXLWorksheet worksheet)
        {
            if (Worksheets.Any(w => string.Equals(w.Name, XLWorksheets.TrimSheetName(name), StringComparison.OrdinalIgnoreCase)))
            {
                worksheet = Worksheet(name);
                return(true);
            }

            worksheet = null;
            return(false);
        }