When the user adds a row (B2),
I want to copy B1 row data to B2 row.
Although "SheetChange" is used, the information on B1 is not retrieved and only EMPTY are output.
How can i get B1 value?
void ThisWorkbook_SheetChange(object Sh, Excel.Range Target)
{
try
{
Excel.Worksheet ws_active = Globals.ThisAddIn.GetActiveSheet();
int column_index = Target.Column;
int row_index = Target.Row;
imsi_break = Convert_object_to_string(ws_active.Cells[row_index - 2, column_index].Value); //get only empty value
imsi_break = Convert_object_to_string(ws_active.Cells[row_index - 1, column_index].Value); //get only empty value
imsi_break = Convert_object_to_string(ws_active.Cells[row_index, 6].Value);
imsi_break = Convert_object_to_string(ws_active.Cells[row_index + 1, 6].Value); //get real value
imsi_break = Convert_object_to_string(ws_active.Cells[row_index + 2, 6].Value);
}
catch (Exception)
{
}
}