// 新規ワークブックの作成 var workbook = new GrapeCity.Documents.Excel.Workbook(); var mc = workbook.Worksheets["Sheet1"].Cells[0, 0]; Console.WriteLine(mc.Address); // $A$1 Console.WriteLine(mc.GetAddress(rowAbsolute: false)); // $A1 Console.WriteLine(mc.GetAddress(referenceStyle: ReferenceStyle.R1C1)); // R1C1 Console.WriteLine(mc.GetAddress(referenceStyle: ReferenceStyle.R1C1, rowAbsolute: false, columnAbsolute: false, relativeTo: workbook.Worksheets[0].Cells[2, 2])); // R[-2]C[-2]
' 新規ワークブックの作成 Dim workbook As New Workbook Dim mc = workbook.Worksheets!Sheet1.Cells(0, 0) Console.WriteLine(mc.Address) ' $A$1 Console.WriteLine(mc.GetAddress(rowAbsolute:=False)) ' $A1 Console.WriteLine(mc.GetAddress(referenceStyle:=ReferenceStyle.R1C1)) ' R1C1 Console.WriteLine(mc.GetAddress(referenceStyle:=ReferenceStyle.R1C1, rowAbsolute:=False, columnAbsolute:=False, relativeTo:=workbook.Worksheets(0).Cells(2, 2))) ' R[-2]C[-2]