如何在PB中统计EXCEL文件的行列数?
问题描述:
如何在PB中统计EXCEL文件的行列数?
解决方案:
OLEObject OLE_MyExcel
OLE_MyExcel =Create OLEObject
OLE_MyExcel. ConnectToNewObject("excel.Application")
OLE_MyExcel.visible=false
OLE_MyExcel.Workbooks.Open("c:\xxx.xls")
messagebox("rows",string(OLE_MyExcel.ActiveWorkbook.Activesheet.UsedRange.Rows.Count))
OLE_MyExcel.quit()
OLE_MyExcel.DisConnectObject()
destroy OLE_MyExcel
本文地址:http://com.8s8s.com/it/it19513.htm