Sub Macro1()
'
' Macro1 Macro
''
Range("G22:J22").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
With Selection.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
End Sub
这是一个excel中画斜线的代码,希望哪个大虾帮忙转成C#代码!
'
' Macro1 Macro
''
Range("G22:J22").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
With Selection.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
End Sub
这是一个excel中画斜线的代码,希望哪个大虾帮忙转成C#代码!
解决方案 »
- c#,请问怎么提取网页中图片元素带有的连接
- 请大虾看下 是不是堆栈错误?
- 特殊字符存入数据库问题
- 超级疑难:c#产品分页 问题 难死我了!
- Vsual c#.Net编译完的程序,在没有装visual studio的电脑上运行,要装个怎样的程序?
- MOBILE中,如何根据用户名来取得拨号连接的名称??
- 用C#编写的DLL,VC怎么调用?
- 找不到System.Runtime.Remoting.Channels.HTTP
- 求一个判断一个字符串是不是IP地址的正则表达式
- 求助大佬!在vs中用c#做一个页面连接到数据库并实现增删改查功能
- 利用google map做gps定位的问题
- 如何调用FormClosed
{
//
// Macro1 Macro
// //
Range("G22:J22").Select();
Selection.Borders(xlDiagonalDown).LineStyle = xlNone;
var _with1 = Selection.Borders(xlDiagonalUp);
_with1.LineStyle = xlContinuous;
_with1.ColorIndex = 0;
_with1.TintAndShade = 0;
_with1.Weight = xlThin;
var _with2 = Selection.Borders(xlEdgeLeft);
_with2.LineStyle = xlContinuous;
_with2.ColorIndex = 0;
_with2.TintAndShade = 0;
_with2.Weight = xlThin;
var _with3 = Selection.Borders(xlEdgeTop);
_with3.LineStyle = xlContinuous;
_with3.ColorIndex = 0;
_with3.TintAndShade = 0;
_with3.Weight = xlThin;
var _with4 = Selection.Borders(xlEdgeBottom);
_with4.LineStyle = xlContinuous;
_with4.ColorIndex = 0;
_with4.TintAndShade = 0;
_with4.Weight = xlThin;
var _with5 = Selection.Borders(xlEdgeRight);
_with5.LineStyle = xlContinuous;
_with5.ColorIndex = 0;
_with5.TintAndShade = 0;
_with5.Weight = xlMedium;
Selection.Borders(xlInsideVertical).LineStyle = xlNone;
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone;
}
好东西呀