[Python] Python: Problem reading an Excel file (.XLS) from a website

Discussão em 'Python' iniciado por Stack, Maio 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Anaconda Spyder and the following line of code is failing recently:

    url = 'https://intranet2.sbs.gob.pe/estadistica/financiera/2024/Julio/C-4252-jl2024.XLS'
    df = pd.read_excel(url)


    Last week I had no problems with this program; however, now I have the following problem (I already tried setting engine='xlrd'):

    • Initial Error: ValueError: Excel file format cannot be determined, you must specify an engine manually.
    • Error when I used engile=xlrd: XLRDError: Unsupported format, or corrupt file: Expected BOF record; found b'\r\n'

    I hope someone can help me fixing the error. Thanks in advance.

    Continue reading...

Compartilhe esta Página