Exemplo n.º 1
0
 internal Worksheet(
     ExcelApplication excel,
     Workbook workbook,
     Excel.Worksheet _worksheet,
     ObjectDisposedCallback disposeCallback,
     bool displayGridLines)
 {
     this.ExcelApplication = excel;
     this.Workbook         = workbook;
     this._worksheet       = _worksheet;
     this._cells           = _worksheet.Cells;
     this.disposeCallback  = disposeCallback;
     this.Name             = _worksheet.Name;
     DisplayGridlines      = displayGridLines;
 }
Exemplo n.º 2
0
 internal Worksheet(
     ExcelApplication excel,
     Workbook workbook,
     Excel.Worksheet _worksheet,
     ObjectDisposedCallback disposeCallback,
     bool displayGridLines)
 {
     this.ExcelApplication = excel;
     this.Workbook = workbook;
     this._worksheet = _worksheet;
     this._cells = _worksheet.Cells;
     this.disposeCallback = disposeCallback;
     this.Name = _worksheet.Name;
     DisplayGridlines = displayGridLines;
 }
Exemplo n.º 3
0
        internal Workbook(
            ExcelApplication excelApplication,
            Excel.Workbook _workbook,
            string filePath,
            ObjectDisposedCallback disposeCallback)
        {
            ExcelApplication = excelApplication;
            this._workbook = _workbook;
            this.FilePath = filePath;
            worksheets = new List<Worksheet>();
            _sheets = _workbook.Worksheets;
            worksheetDisposeCallback = sender => worksheets.Remove((Worksheet)sender);
            this.disposeCallback = disposeCallback;
            for (var i = 1; i <= _sheets.Count; i++)
            {
                worksheets.Add(new Worksheet(ExcelApplication, this, _sheets[i], worksheetDisposeCallback, false));
            }

            worksheets[0].Activate();
        }
Exemplo n.º 4
0
        internal Workbook(
            ExcelApplication excelApplication,
            Excel.Workbook _workbook,
            string filePath,
            ObjectDisposedCallback disposeCallback)
        {
            ExcelApplication         = excelApplication;
            this._workbook           = _workbook;
            this.FilePath            = filePath;
            worksheets               = new List <Worksheet>();
            _sheets                  = _workbook.Worksheets;
            worksheetDisposeCallback = sender => worksheets.Remove((Worksheet)sender);
            this.disposeCallback     = disposeCallback;
            for (var i = 1; i <= _sheets.Count; i++)
            {
                worksheets.Add(new Worksheet(ExcelApplication, this, _sheets[i], worksheetDisposeCallback, false));
            }

            worksheets[0].Activate();
        }