testMSOffice.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def TestAll():
    TestWord()

    print "Starting Excel for Dynamic test..."
    xl = win32com.client.dynamic.Dispatch("Excel.Application")
    TextExcel(xl)

    try:
        print "Starting Excel 8 for generated excel8.py test..."
        mod = gencache.EnsureModule("{00020813-0000-0000-C000-000000000046}", 0, 1, 2, bForDemand=1)
        xl = win32com.client.Dispatch("Excel.Application")
        TextExcel(xl)
    except ImportError:
        print "Could not import the generated Excel 97 wrapper"

    try:
        import xl5en32
        mod = gencache.EnsureModule("{00020813-0000-0000-C000-000000000046}", 9, 1, 0)
        xl = win32com.client.Dispatch("Excel.Application.5")
        print "Starting Excel 95 for makepy test..."
        TextExcel(xl)
    except ImportError:
        print "Could not import the generated Excel 95 wrapper"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号