Constants from Excel?

T

Tim Roberts

I've done a lot of COM work from Python, including control of the Office
applications. However, I have a question that I've never been able to
answer.

Is there a way to programmatically fetch the values of COM constants? For
example, in my Excel apps, I have a section like this, that I have gleaned
from multiple Google posts:

xlPortrait = 1 # orientation constants
xlLandscape = 2
xlWKS = 4 # SaveAs format constants
xlExcel9795 = 43
xlHAlignRight = -4152
xlHAlignCenter = -4108

This works, but it'd be nicer to create an instance of, say,
Excel.Constants and pull the values from there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top