Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8326571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:48:22+00:00 2026-06-09T00:48:22+00:00

I am trying to export a list to excel via the Win32COM client whihc

  • 0

I am trying to export a list to excel via the Win32COM client whihc i have imported at the header.
The object i created is coded as below, but I cant seem to get it to export each value to its own row in the spreadsheet. If I can get a good pointer (other than give up python!! :D), I would appreciate it.

class XcelExport():
    def excel(self):
        app = 'Excel'
        xl = win32.gencache.EnsureDispatch('%s.Application' % app)
        ss = xl.Workbooks.Open(r'C:\MyFile.xls')
        sh = ss.ActiveSheet
        xl.Visible = True
        sleep(.1)  
        sh.Cells(1,1).Value = 'Export-to-%s : Items' % app
        sleep(.1)
        for i in EventTableRFT:
            sh.Range("A").Value = i 
        sh.Cells(i+2,1).Value = "End of the List!"

xprt = XcelExport()
xprt.excel()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T00:48:24+00:00Added an answer on June 9, 2026 at 12:48 am

    Since you seemed to like my answer/comment, here’s an answer proper:

    Python Excel has just about everything you’d ever need. If you want something more integrated but seems limited, there is IronSpread. XLRD and XLWT are great packages, but they don’t support *.xlsx files. IronSpread is Windows only and only support ’07 and ’10 versions of Excel. Each has it’s caveats. In the end, you can use both (edit as *.xlsx, then save as to *.xls (I had someone who had speed issues with large *.xls files, but my script wrote 200mb of text from that thing in like 1 minute.)).

    Oh, and I would definitely read (skim) the documentation for interesting features such as getting the cell types etc of xlrd/xlwt. It’s worth it, if only because it’s short and will save you the learning curve of experimenting.

    Super short example of xlwt:

    import xlwt
    from tempfile import TemporaryFile
    book = xlwt.Workbook()
    sheet1 = book.add_sheet('sheet1')
    
    supersecretdata = [34,123,4,1234,12,34,12,41,234,123,4,123,1,45123,5,43,61,3,56]
    
    for i,e in enumerate(supersecretdata):
        sheet1.write(i,1,e)
    
    name = "random.xls"
    book.save(name)
    book.save(TemporaryFile())
    

    Super short example of xlrd:

    import xlrd
    from xlrd import open_workbook
    book = open_workbook('random.xls')
    sheet1 = book.sheet_by_index(0)
    data = []
    
    for i in xrange(sheet1.nrows):
        data.append(sheet1.cell(i,1).value)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to export the charts from Excel as an image file
I have been trying to export some datagrids in Silverlight to excel, but have
I'm trying to export a mysql query table to an excel file. I have
I'm trying to use jXLS to export data from a list to an Excel
I'm trying to export the schema of my database so another developer can have
I was trying to add the strings to the List and export the list
I am trying to create a list action in the admin generator. I have
I'm trying to create an export Excel/CSV function that will iterate through a custom
I am trying to export a list of graphics as separate frames in PDF
I am trying to export a list to a CSV file. I got it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.