1

I am trying to use win32com.client to load in a workbook and then refresh it.

I have narrowed down my problem to this error when running this command:

import win32com.client as win32
xlapp = win32.DispatchEx('Excel.Application')

pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

I have no issues when running from my local machine. However, I am running from a virtual machine that does not have excel installed. Would this be causing the error?

1 Answer 1

3

If you do not have Excel installed, how do you expect pywin32 to dispatch it?

I think this is the main issue if you're able to make it run from your local machine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.