I'm trying to load xlsx files using pyodide. I able to load xls files correctly using the following code:
response = await fetch('${fileUrl}')
js_buffer = await response.arrayBuffer()
dFrame = pd.read_excel(BytesIO(js_buffer.to_py()))
However, it fails when I try to pass an xlsx file. I am not sure what's causing it. Here are potential issues that I already struck-out after testing:
- "openpyxl" not properly loaded - I used micropip to load openpyxl, and pd.read_excel('filename.xlsx') works when I manually place a valid xlsx file in the memory. So this isn't the issue.
Thanks for the help.