2
使用win32com.client,如何計算excel文件中的所有頁數?使用win32com.client計算Excel文件中的頁數
使用win32com.client,如何計算excel文件中的所有頁數?使用win32com.client計算Excel文件中的頁數
發現:
excel = win32.gencache.EnsureDispatch('Excel.Application')
try:
wb = excel.Workbooks.Open(file)
except:
print "Failed to open spreadsheet " + file
sys.exit(1)
count = wb.Sheets.Count
請發表您已經嘗試了代碼,並解釋它是如何不爲你工作。 – Lazarus 2011-03-25 12:37:27