Constants from Excel?

Discussion in 'Python' started by Tim Roberts, Feb 26, 2004.

  1. Tim Roberts

    Tim Roberts Guest

    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.
    --
    - Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Feb 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Excel _WorkBook vs. Excel.Workbook

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Sep 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,647
    Steve C. Orr [MVP, MCSD]
    Sep 29, 2004
  2. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,395
    Carl Prothman [MVP]
    Jan 12, 2005
  3. Chetan Gadgil

    RE: Constants from Excel?

    Chetan Gadgil, Feb 26, 2004, in forum: Python
    Replies:
    0
    Views:
    588
    Chetan Gadgil
    Feb 26, 2004
  4. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,525
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Li Chen
    Replies:
    2
    Views:
    159
    Li Chen
    Dec 1, 2006
Loading...

Share This Page