有人可以帮我处理代码示例以执行以下操作
这是开始
' Create new Application.
Dim excel As Excel.Application = New Excel.Application
' Open Excel spreadsheet.
Dim w As Excel.Workbook = excel.Workbooks.Open("Y:\rjcp\testFile.xslx")
'THIS IS WHERE I AM HAVING AN ISSUE
Dim r As Excel.Range = sheet.Range("A1", excel.Range("A1").End(Microsoft.Office.Interop.Excel.XlDirection.xlToRight))
For Each aCell In r
答案 0 :(得分:0)
for i = 1 to activesheet.usedrange.columns.count
if cells(2,i).value = format(date,"dd/mm/yy") ' input your desired date format here
msgbox cells(2,i).column
end if