In _Application_SheetActivate
dataArray = ((Excel.Worksheet)Sh).UsedRange.Value2;
In Application_SheetChange(object Sh, Excel.Range Target)
var deletedRow = _dataArray.ToJaggedArray();
var values = deletedRow[Target.Row - 1];
public static object[][] ToJaggedArray(this object[,] array)
{
object[][] jagged = new object[array.GetLength(0)][];
for (int i = 0; i < array.GetLength(0); i++)
{
jagged[i] = new object[array.GetLength(1)];
for (int j = 1; j <= array.GetLength(1); j++)
{
jagged[i][j - 1] = array[i + 1, j];
}
}
return jagged;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…