Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecting ranges in Spreadsheetlight

Tags:

c#

excel

Does anyone know if its possible to select a range, or maybe a list of SLcell in Spreadsheetlight? My goal is to do a foreach loop. Currently I am using nested for loops.

foreach(SLCell cell in myRange)
{
}

Interop would be:

Excel.Range myRange= sheet.get_Range("A1", "B4");

Excel.Range myRange= sheet.get_Range(Cells(1,1), Cells(4,2));
like image 256
Just R Avatar asked Oct 21 '22 18:10

Just R


1 Answers

You can use GetCells() from your SLDocument instance. Then foreach(var cell in cells)

like image 84
Steve Rousseau Avatar answered Oct 27 '22 21:10

Steve Rousseau