Пример #1
0
 void Application_SheetSelectionChange(object Sh, Microsoft.Office.Interop.Excel.Range Target)
 {
     if (frm != null && frm.Status == "I")
     {
         _address = Target.get_AddressLocal(Target.Row, Target.Column, Microsoft.Office.Interop.Excel.XlReferenceStyle.xlA1, 0, 0);
         string address = _address.Replace("$", "");
         string value   = "";
         try { value = Target.get_Value(type).ToString(); }
         catch { }
         frm.SetValueFocus(address, value);
     }
 }
Пример #2
0
 private void adxExcelEvents_SheetSelectionChange(object sender, object sheet, object range)
 {
     Excel.Range Target = range as Excel.Range;
     if (frm != null && frm.Status == "I")
     {
         _address = Target.get_AddressLocal(Target.Row, Target.Column, Microsoft.Office.Interop.Excel.XlReferenceStyle.xlA1, 0, 0);
         string address = _address.Replace("$", "");
         string value   = "";
         try { value = Target.get_Value(type).ToString(); }
         catch { }
         frm.SetValueFocus(address, value);
     }
 }