利用做了个excel打印预览,想去掉excel单元格的边线
        GoldPrinter.ExcelConstants.BordersEdge BordersEdge = new GoldPrinter.ExcelConstants.BordersEdge();
        GoldPrinter.ExcelConstants.BordersLineStyle BordersLineStyle = new GoldPrinter.ExcelConstants.BordersLineStyle();
        GoldPrinter.ExcelConstants.BordersWeight BordersWeight = new GoldPrinter.ExcelConstants.BordersWeight();
            excel.SetBordersEdge(2 + 18 * k, 1, 2 + 18 * k, 8, BordersEdge, BordersLineStyle, BordersWeight);这样做的话会去掉左,右,上的边线,我想知道怎么能去掉制定的边线,比如只去掉上线,或者去掉左,右线
请大家帮帮忙,谢谢~~~~~~~~~~~~~~~~~~~~~~~~

解决方案 »

  1.   

    遇到这类问题,不用上来问得,到Excel里面,建立一个宏——开始录制,然后做你想要的操作,最后去宏编辑器里面看,代码就是你要的代码了,一抹一样,不会有任何差别的。当然,那是VB的,如果要改成C#,也是非常简单的,毕竟方法和函数都是相同的。这类问题,10分钟肯定搞定的
      

  2.   

    谁用过金质打印通控制excel单元格的边线啊,SetBordersEdge属性不能单独对某一条线操作吗?
    楼上的说用宏录制
    不过我现在已经用金质打印通来操作excel了,不知道你用过金质打印通没,用过的话请指教一下
    金质打印通中哪个属性能实现
    ' biankuang2 Macro
    ' 宏由 MC SYSTEM 录制,时间: 2007-5-23
    ''
        Selection.Borders(xlDiagonalDown).LineStyle = xlNone
        Selection.Borders(xlDiagonalUp).LineStyle = xlNone
        Selection.Borders(xlEdgeLeft).LineStyle = xlNone
        Selection.Borders(xlEdgeTop).LineStyle = xlNone
        Selection.Borders(xlEdgeBottom).LineStyle = xlNone
        Selection.Borders(xlEdgeRight).LineStyle = xlNone
      

  3.   

    兄弟,jzdyt的作者就是CSDN的兄弟,上次还在图表区看到他回帖