public void BorderAround(XlLineStyle lineStyle, XlBorderWeight weight, XlColorIndex index) { object[] paramArray = new object[4]; paramArray[0] = lineStyle; paramArray[1] = weight; paramArray[2] = index; paramArray[3] = Missing.Value; InstanceType.InvokeMember("BorderAround", BindingFlags.InvokeMethod | BindingFlags.OptionalParamBinding, null, ComReference, paramArray, XlLateBindingApiSettings.XlThreadCulture); }
/// <summary> /// Dar formato de tabla a los valores de la hoja. /// </summary> /// <param name="bordes_internos">Valor que indica si se deben mostrar los bordes internos</param> public override void formatoTabla(bool bordes_internos) { XlLineStyle estilo = XlLineStyle.xlContinuous; XlBorderWeight ancho = XlBorderWeight.xlThin; XlColorIndex color = XlColorIndex.xlColorIndexAutomatic; if (bordes_internos) { _seleccionado.Borders[XlBordersIndex.xlInsideHorizontal].LineStyle = estilo; _seleccionado.Borders[XlBordersIndex.xlInsideHorizontal].Weight = ancho; _seleccionado.Borders[XlBordersIndex.xlInsideVertical].LineStyle = estilo; _seleccionado.Borders[XlBordersIndex.xlInsideVertical].Weight = ancho; } _seleccionado.BorderAround(estilo, ancho, color, Color.Black.ToArgb()); }
public object BorderAround(object LineStyle, XlBorderWeight Weight, XlColorIndex ColorIndex, object Color) { throw new NotImplementedException(); }
/// <summary>向单元格区域添加边框,并设置该新边框的 Color、LineStyle 和 Weight 属性。Variant 类型。 /// </summary> /// <param name="LineStyle">用于指定边框线样式的 XlLineStyle 常量之一。</param> /// <param name="Weight">边框粗细。</param> /// <param name="ColorIndex">边框颜色,作为当前调色板的索引或作为 XlColorIndex 常量。</param> /// <param name="Color">边框颜色,以 RGB 值表示。</param> public dynamic BorderAround(XlLineStyle? LineStyle = null, XlBorderWeight Weight = XlBorderWeight.xlThin, XlColorIndex ColorIndex = XlColorIndex.xlColorIndexAutomatic, int? Color = null) { _objaParameters = new object[4] { LineStyle == null ? System.Type.Missing : LineStyle, Weight, ColorIndex, Color == null ? System.Type.Missing : Color }; return _objRange.GetType().InvokeMember("BorderAround", BindingFlags.InvokeMethod, null, _objRange, _objaParameters); }