我需要在第一行下方插入一个新行。使用下面的代码,我需要添加什么来完成它?
Excel.Application excelApp = new Excel.Application();
string myPath = @"Data.xlsx";
excelApp.Workbooks.Open(myPath);
// Get Worksheet
Excel.Worksheet worksheet = excelApp.Worksheets[1];
int rowIndex = 2; int colIndex = 2;
for (int i = 0; i < 10; i++)
{
excelApp.Cells[rowIndex, colIndex] = "\r123";
}
excelApp.Visible = false;
谢谢 :)