Menu

change_workbook() not working

Help
Joseph
2011-05-11
2013-05-02
  • Joseph

    Joseph - 2011-05-11

    I am just starting to use this project, and I can't get the .change_workbook("…") to function correctly.  It does not throw an error, but the active workbook does not change.  I am using Windows and Excel 2007. 

    Everything else seems to work fine so far, except pasting a large array onto another sheet, but that is probably due to poor coding.  If you care to help, I have this:

    bigArray = wb[23:1827,4]
    wb.change_sheet("nextSheet")
    wb[4:,57] = bigArray
    

    All of the target cells are filled, but each is filled with the first value in bigArray.

     
  • cloudform

    cloudform - 2011-05-11

    Thanks for the bug report.  I'm suddenly having issues with workbooks, which I have never had before.  Something you should do is try ending the "EXCEL.exe" process and trying again.  Sometimes the com system breaks (because of excel, not me… I think).

    As for the code, it is another bug.  Stupid microsoft wants you to give them the data in the form "[, , ,  … " if it is going down a column.  Just be thankful you don't have to deal with this crap!

     

Log in to post a comment.