@FernandoGFMC,
I tested your code on my SPO environment, here it works well. From the error msg, it seems that the relative_url of the file is not correct.
If your file is in the default library, the ServerRelativeUrl should be:
/sites/{site}/Shared Documents/{filename}.xlsx
'Documents' is the list name while Shared Documents is the root folder. In fact, I am able to produce the error if I set a wrong URL:
BR
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…