2

I used Excel.Range.Value but it writes the same value to all the columns' cells.

object[] weights = new object[10000];

Excel.Range startCell = (Excel.Range)worksheet.Cells[2, cols+1];
Excel.Range endCell = (Excel.Range)worksheet.Cells[rows, cols+1];
Excel.Range writeRange = worksheet.get_Range(startCell,endCell);
writeRange.Value = weights;
4

1 回答 1

2

Range.Value 属性为非标量值采用 2D 对象。

于 2013-05-22T11:14:00.360 回答