Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open an Excel file
#5
As i said in my home computer i don't have microsoft office.
i use libre office. i have renamed the extention to xlsx as intructed in the book i am ready. So maybe that's why openpyxl doesn't work.
in my office computer it works just fine.

trying your proposal
df = pd.read_excel(r'C:\Users\Desktop\Python\example.xlsx')
i get the following error:
Error:
Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> df = pd.read_excel(path) File "C:\Users\mlakhili\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_base.py", line 304, in read_excel io = ExcelFile(io, engine=engine) File "C:\Users\mlakhili\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_base.py", line 821, in __init__ self._reader = self._engines[engine](self._io) File "C:\Users\mlakhili\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_xlrd.py", line 20, in __init__ import_optional_dependency("xlrd", extra=err_msg) File "C:\Users\mlakhili\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\compat\_optional.py", line 92, in import_optional_dependency raise ImportError(msg) from None ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
Reply


Messages In This Thread
Open an Excel file - by Friend - Feb-17-2020, 08:42 PM
RE: Open an Excel file - by jefsummers - Feb-18-2020, 12:32 AM
RE: Open an Excel file - by Friend - Feb-18-2020, 08:38 AM
RE: Open an Excel file - by buran - Feb-18-2020, 09:11 AM
RE: Open an Excel file - by Friend - Feb-18-2020, 02:19 PM
RE: Open an Excel file - by buran - Feb-18-2020, 02:33 PM
RE: Open an Excel file - by Friend - Feb-18-2020, 03:27 PM
RE: Open an Excel file - by buran - Feb-18-2020, 03:43 PM
RE: Open an Excel file - by jefsummers - Feb-18-2020, 04:34 PM
RE: Open an Excel file - by Friend - Feb-18-2020, 05:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python openyxl not updating Excel file MrBean12 1 342 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Copy Paste excel files based on the first letters of the file name Viento 2 455 Feb-07-2024, 12:24 PM
Last Post: Viento
  Open/save file on Android frohr 0 337 Jan-24-2024, 06:28 PM
Last Post: frohr
  file open "file not found error" shanoger 8 1,157 Dec-14-2023, 08:03 AM
Last Post: shanoger
  Search Excel File with a list of values huzzug 4 1,265 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Updating sharepoint excel file odd results cubangt 1 855 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  How can i combine these two functions so i only open the file once? cubangt 4 875 Aug-14-2023, 05:04 PM
Last Post: snippsat
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,116 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Save and Close Excel File avd88 0 3,084 Feb-20-2023, 07:19 PM
Last Post: avd88
  Trying to access excel file on our sharepoint server but getting errors cubangt 0 823 Feb-16-2023, 08:11 PM
Last Post: cubangt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020