Beispiel #1
0
        private void Listing_2_15()
        {
            Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
                Controls.AddNamedRange(this.Range["A1", "A10"], "namedRange1");

            Microsoft.Office.Tools.Excel.NamedRange namedRange2 =
                Controls.AddNamedRange(this.Range["A1", missing], "namedRange2");

            namedRange1.Merge(false);
            namedRange2.Merge(false);

            namedRange1.BorderAround(missing, Excel.XlBorderWeight.xlThin,
                                     Excel.XlColorIndex.xlColorIndexAutomatic, missing);
            namedRange1.AutoFormat(Excel.XlRangeAutoFormat.xlRangeAutoFormat3DEffects1,
                                   true, false, true, false, true, true);
        }