I am currently using python 2.7 and trying to open an Excel sheet. When using the code below:
import os
from win32com.client import Dispatch
xlApp = win32com.client.Dispatch("Excel.Application")
xlApp.Visible = True
# Open the file we want in Excel
workbook = xlApp.Workbooks.Open('example.xls')
I get this error:
ImportError: No module named win32com.client
Is there any possibility of getting the error since I am using 64-bit Windows machine?
pip install pywin32
didn't work for me but pypiwin32
did.