Public Sub ChooseFrameLine(ByVal startColumn As Integer, ByVal startRow As Integer, ByVal endColumn As Integer, ByVal endRow As Integer, ByVal line As String)
Me._openExcel.Range(Me._openExcel.Cells(startRow, startColumn), Me._openExcel.Cells(endRow, endColumn)).Select()
If line.IndexOf("Left") >= 0 Then
Me._openExcel.Selection.borders(7).linestyle = 1
End If
If line.IndexOf("Right") >= 0 Then
Me._openExcel.Selection.borders(10).linestyle = 1
End If
If line.IndexOf("Top") >= 0 Then
Me._openExcel.Selection.borders(8).linestyle = 1
End If
If line.IndexOf("Bottom") >= 0 Then
Me._openExcel.Selection.borders(9).linestyle = 1
End If
If line.IndexOf("Vertical") >= 0 Then
Me._openExcel.Selection.borders(11).linestyle = 1
End If
If line.IndexOf("Horizontal") >= 0 Then
Me._openExcel.Selection.borders(12).linestyle = 1
End If
Me._openExcel.Columns.AutoFit()
End Sub
'adjust data
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
'
Dim i As Integer
Dim j As Integer
Dim Rows As Integer
Dim Cols As Integer
' Start Excel and get Application object.
oXL = CreateObject("Excel.Application")
oXL.Visible = True
为什么我调用这个函数没有反映啊
Public Sub biankuang()
Dim exl As Excel.Application = New Excel.Application
Dim range As Excel.Range
mWorkSheet = mWorkBook.ActiveSheet
'mWorkSheet.Range("B11").Select()
'With mWorkSheet.Range("B11")
' .Borders.LineStyle = Excel.XlLineStyle.xlContinuous
Me.mWorkSheet.Range(Me.mExlApp.Cells(9, 1), Me.mExlApp.Cells(9, 10)).Select()