문제

I am reading in data from an Excel sheet so I have this code to get the region I want;

Excel.Range range = (Excel.Range)worksheet.get_Range("A9", "AO" + (worksheet.UsedRange.Rows.Count).ToString());
System.Array rangeCells = (System.Array)range.Cells.Value;

So my Data is x long and 41 cells wide so my array looks like;

rangeCells[1,1] through to rangeCells[1,41] is line 1
rangeCells[2,1] through to rangeCells[2,41] is line 2

and so forth until the end.

Does anyone know of a LINQ way to get each line into an object?

도움이 되었습니까?

해결책

I don't believe this is possible because multi-dimensional arrays do not impliment IEnumerable

Discussed more:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top