16,554
社区成员
发帖
与我相关
我的任务
分享
#Region "复制EXCEL的Sheet"
''' <summary>
''' 复制EXCEL的Sheet
''' </summary>
''' <returns></returns>
''' <remarks>复制最后的Sheet,并于最末尾追加</remarks>
Public Function XlsSheetCopy() As XLS_RESULT
Dim iSheetCnt As Integer
Try
iSheetCnt = oSheets.Count
oSheetYobi1 = DirectCast(oSheets(iSheetCnt), Excel.Worksheet)
oSheetYobi1.Copy(After:=oSheetYobi1)
MRComObject(oSheetYobi1)
Catch ex As Exception
Me.XlsFileRelease()
Return XLS_RESULT.XLS_NG
Finally
MRComObject(oSheetYobi1)
End Try
End Function
#End Region