Trouble opening Excel document via python -


I am not a very advanced Python user and I am having trouble with that program on which I am working . I was able to work it out without problems on a computer, but now when I try to run on another computer it is not working.

Actually I'm trying to open an Excel file and write stuff and then save it.

Here is the error

  traceback (most recent call final): File "C: \ user \ aainstall \ Desktop \ Python \ DD \ DDcreatemachesheets10_27_14.py", line 70 , & Lt; Module & gt; Wb = excel.Workbooks.Open ("Allmacro.xlsx") file "C: \ Python 34 \ lib \ site-packages \ win32com \ gen_py \ 00020813-0000-0000-C000-000000000046x0x1x7 \ Workbooks.py", line 78, Open, converter, addToMru, local, corrupted load) pywintypes.com_error: (-2147352567, 'Exception happened.', (0, 'Microsoft Excel', '' Elmacro.xslsex ''.) Check the spelling of filename, And verify that the file location is correct. \ N \ nIf you are trying to open the file from the list of recently used files, make sure The file name has not been changed, moved, or has not been deleted. ", 'Xlmain11  
  import xlrd import as win32com.client as win32 excel = win32. For the Gencache.EnsureDispatch ('Excel.Application') I listofDDlists: cellnumber = 0 if I == allCD: wb = excel.Workbooks.Open ("Allmacro.xlsx") print (wb) excel.Visible = True ws = Wb .Worksheets ("MyData")  

I was pret tired about the fact that what the file is looking like can be more about fixing the problem And is in the right place Do not have that problem.

Both computers I am trying to run it which is using Windows 7. The computer on which it works is using Python 3.3, while this computer does not work on which Excel 2010 was installed on both computers using Python 3.4.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -