This project has moved and is read-only. For the latest updates, please go here.

How can I get a range of columns and a range of rows?

Dec 4, 2014 at 7:25 PM
Hi People! Is possible to get a range of columns and a range of rows?

Thanks!
Dec 9, 2014 at 4:18 PM
I Found then Answer to my question
  1. Get a range of Rows:
  2. Obtain row 7 => var row = worksheet.Cells[7, 1, 7, ExcelPackage.MaxColumns];
  3. Obtain rows 2-4 => var rows = worksheet.Cells[2, 1, 4, ExcelPackage.MaxColumns];
  4. Get a range of Columns:
  5. Obtain column 3 => var column = worksheet.Cells[1, 3, ExcelPackage.MaxRows, 3];
  6. Obtain columns 5-7 => var columns = worksheet.Cells[1, 5, ExcelPackage.MaxRows, 7];
Happy coding! ;)