只能用VBA来完成,提高悬赏分,在下面补全代码即可!
Private Sub CommandButton1_Click()
Dim strA As String, wb As Workbook, i As Long, n As Long
strA = Dir(ThisWorkbook.Path & "\*.xls")
Do While strA <> ""
For Each wb In Workbooks
If wb.Name = strA Then GoTo wbnext
Next
Set wb = Workbooks.Open(ThisWorkbook.Path & "\" & strA)
wbnext:
'处理数据
???
'处理数据完成
strADo:
wb.Close True
strA = Dir
Loop
End Sub