private void HandleSingleCellAddress(RangeAddress rangeAddress, ExcelAddressInfo addressInfo)
        {
            int col, row;

            _addressTranslator.ToColAndRow(addressInfo.StartCell, out col, out row);
            rangeAddress.FromCol = col;
            rangeAddress.ToCol   = col;
            rangeAddress.FromRow = row;
            rangeAddress.ToRow   = row;
        }
        private void HandleMultipleCellAddress(RangeAddress rangeAddress, ExcelAddressInfo addressInfo)
        {
            int fromCol, fromRow;

            _addressTranslator.ToColAndRow(addressInfo.StartCell, out fromCol, out fromRow);
            int toCol, toRow;

            _addressTranslator.ToColAndRow(addressInfo.EndCell, out toCol, out toRow, AddressTranslator.RangeCalculationBehaviour.LastPart);
            rangeAddress.FromCol = fromCol;
            rangeAddress.ToCol   = toCol;
            rangeAddress.FromRow = fromRow;
            rangeAddress.ToRow   = toRow;
        }
Пример #3
0
 private void HandleSingleCellAddress(RangeAddress rangeAddress, ExcelAddressInfo addressInfo)
 {
     int col, row;
     _addressTranslator.ToColAndRow(addressInfo.StartCell, out col, out row);
     rangeAddress.FromCol = col;
     rangeAddress.ToCol = col;
     rangeAddress.FromRow = row;
     rangeAddress.ToRow = row;
 }
Пример #4
0
 private void HandleMultipleCellAddress(RangeAddress rangeAddress, ExcelAddressInfo addressInfo)
 {
     int fromCol, fromRow;
     _addressTranslator.ToColAndRow(addressInfo.StartCell, out fromCol, out fromRow);
     int toCol, toRow;
     _addressTranslator.ToColAndRow(addressInfo.EndCell, out toCol, out toRow, AddressTranslator.RangeCalculationBehaviour.LastPart);
     rangeAddress.FromCol = fromCol;
     rangeAddress.ToCol = toCol;
     rangeAddress.FromRow = fromRow;
     rangeAddress.ToRow = toRow;
 }
Пример #5
0
 private void SetCurrentWorksheet(ExcelAddressInfo addressInfo)
 {
     if (addressInfo.WorksheetIsSpecified)
     {
         _currentWorksheet = _package.Workbook.Worksheets[addressInfo.Worksheet];
     }
     else if (_currentWorksheet == null)
     {
         _currentWorksheet = _package.Workbook.Worksheets.First();
     }
 }