1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Dim xlApp As Excels.Application
Dim xlWorkSheet As Excels.Worksheet
Dim xlWorkBook As Excels.Workbook
xlApp = New Excels.ApplicationClass
xlApp.DisplayAlerts = False
Dim comSelectTicker As New SqlCommand("select * from ETF_Assets", m_con)
dtt = GetData(comSelectTicker)
For i = 0 To dtt.Rows.Count - 1
ticker = dtt.Rows(i).Item(1)
Dim chemin As String = "D:\MD\ETFdb\Details-Ticker\" & ticker & "_" & datedujour & ".xls"
If File.Exists(chemin) Then
xlWorkBook = xlApp.Workbooks.Open(chemin)
xlWorkSheet = xlApp.ActiveWorkbook.ActiveSheet
xlWorkSheet = xlWorkBook.Worksheets(1)
for x=0 to 80
'parcourir les données de la feuille excel
Next x
End If
Next i |