如果您安装了VB,帮我想想办法,在EXCEL中求末行的语句,在VB中就是通不过(暂发现仅这条通不过)
duquancai老师,帮我看看哦,谢谢了
Private Sub Command1_Click() Dim Ex As Object Dim Exwbook As Object Dim Exsheet AsObject Set Ex= CreateObject("Excel.Application") Set Exwbook = Ex.Workbooks.Open("d:\123.xlsx") Set Exsheet = Exwbook.sheets(1) ' ir= Exsheet.Range("A60000").End(xlup).Row ' ir= Exsheet.Columns("A:A").SpecialCells(xlCellTypeLastCell).Row ' ir= Ex.activesheet.Range("A60000").End(xlup).Row ' ir= Exsheet.Range("A65500").End(Excel.XlDirection.xlUp).Row.ToString() ir = Exsheet.usedrange.Rows.Count '本条通过 arr = Exsheet.Range("a6:n" & ir) 这里是数据处理代码,略 ……………………………….. Exwbook.Save Exwbook.Close Ex.Quit ' 退出 Excel Set Exsheet = Nothing Set Exwbook = Nothing Set Ex = Nothing End sub
|