此主题相关图片如下:微信截图_20221017161015.png
Book.Sheets(0),这个index位置怎么获取?
把自己绕进去了,开始写了for each
改一下思路就清楚了
For i As Integer = 0 To Book.Sheets.Count - 1 \' For Each s As XLS.Sheet In Book.Sheets If Book.Sheets(i).Visible = True Then If Book.Sheets(i).name.Contains("XX数据") Then idx = i End If End If Next