I have a ton of Utility classes in vbscript, ie excelUtils would have methods such as isRowEmpty and gotoCell
Similar things for getting getting and setting regKeys, get IP address, etc.
Working on creating a new framework in C#. Experts, does it make sense to carry forward these sort of classes, or just call it straight, ie use Microsoft.Office.Interop.Excel methods directly where applicable? thanks in advance!
Code:
Public Sub isRowEmpty (byval iRow)
Dim xlObj : set xlObj = eval("getobject(,""Excel.Application"")")
Dim actWS : Set actWS = xlObj.ActiveWorkbook.ActiveSheet
cell = "A" & iRow
actWS.range(cell).Activate
isRowEmpty = false
If xlObj.CountA(xlobj.ActiveCell.EntireRow)=0 Then isRowEmpty = true
set actWS = nothing
set xlObj = nothing
End Sub
Public Sub gotoCell (byval setCell)
Dim xlObj
Dim actWS
Set xlObj = eval("getobject(,""Excel.Application"")")
Set actWS = xlObj.ActiveWorkbook.ActiveSheet
actWS.range(setCell).Activate
set actWS = nothing
set xlObj = nothing
End Sub
Working on creating a new framework in C#. Experts, does it make sense to carry forward these sort of classes, or just call it straight, ie use Microsoft.Office.Interop.Excel methods directly where applicable? thanks in advance!