How to count the ranks of the Excel file in PB? (Original)

xiaoxiao2021-03-06  30

How to count the ranks of the Excel file in PB?

Problem Description:

How to count the ranks of the Excel file in PB?

solution:

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

转载请注明原文地址:https://www.9cbs.com/read-65010.html

New Post(0)