我想读取d:\sss.xls 中sheet1 A3:C5的数据,在TXT文本框中显示为
A3 A4 A5
B3 B4 B5
C3 C4 C5
该怎么写?
自己的代码:
On Error Resume Nexe
Set xlBook = xlApp.Workbooks.Open("d:\sss.xls")
xlApp.Visible = False
Set xlSheet = xlBook.Sheets("sheet1")
xlSheet.Select
Text1.Text = ""
Dim a(3, 3) As Intege
For i = 1 To 3
For j = 1 To 3
a(i, j) = Int(xlSheet.Range("A3"))
Next j, i
For i = 1 To 3
For j = 1 To 3
Text1.Text = Text1.Text + Str(a(i, j)) + " "
Next j
Text1.Text = Text1.Text + vbNewLine
Next i
显示的结果全是A3的值,怎么修改啊。