本文整理汇总了C#中Microsoft.Office.Interop.Excel.get_Address方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Office.Interop.Excel.get_Address方法的具体用法?C# Microsoft.Office.Interop.Excel.get_Address怎么用?C# Microsoft.Office.Interop.Excel.get_Address使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Office.Interop.Excel
的用法示例。
在下文中一共展示了Microsoft.Office.Interop.Excel.get_Address方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: xlWorkSheet_Change
void xlWorkSheet_Change(Excel.Range Target)
{
//Console.WriteLine("{0}:{1} -> {2}", Target.Row, Target.Column, Target.Value2.ToString());
//Console.WriteLine(Target.Count);
//Called when a cell or cells on a worksheet are changed.
Debug.WriteLine("Delegate: You Changed Cells " +
Target.get_Address(Missing.Value, Missing.Value,
Excel.XlReferenceStyle.xlA1, Missing.Value, Missing.Value) +
" on " + Target.Worksheet.Name);
}
示例2: Change
public static void Change(Excel.Range target)
{
string address = target.get_Address((object) false, (object) false, Excel.XlReferenceStyle.xlA1, (object) false, Type.Missing);
string key = Globals.Workbooks[(Excel.Workbook) target.Worksheet.Parent] + "." + Globals.Worksheets[(Excel.Worksheet) target.Parent] + "." + address;
string formula = Globals.FixFormula((string) target.Formula);
if(formula.StartsWith("CONSTRAIN")) {
formula = formula.Substring(11, formula.Length - 13);
formula = "CONSTRAIN(" + formula + ")";
}
Globals.ConstraintSolver.Change(key, formula);
}
示例3: getSelectedRangeAddress
protected string getSelectedRangeAddress(Excel.Range r)
{
return ((Excel.Worksheet)r.Parent).Name + "!" + r.get_Address(Type.Missing, Type.Missing, Excel.XlReferenceStyle.xlA1, Type.Missing, Type.Missing);
}
示例4: CellsChange
private void CellsChange(Excel.Range Target)
{
//This is called when any cell on a worksheet is changed.
Debug.WriteLine("Delegate: You Changed Cells " +
Target.get_Address(Missing.Value, Missing.Value,
Excel.XlReferenceStyle.xlA1, Missing.Value, Missing.Value) +
" on " + Target.Worksheet.Name);
}