Adding Excel File to Jupyter Notebook


#1

Hello,
I installed the ExcelReaders package from github, and on Jupyter Notebook I write:
using ExcelReaders

data = readxlsheet(“http://localhost:8889/view/Desktop/UT%20Austin%20Econ/2nd%20Year/IO/Filename.xlsx”, “Sheet1”)

I get the error:
PyError (ccall(@pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C_NULL)) <type ‘exceptions.IOError’>
IOError(22, “invalid mode (‘rb’) or filename”)
File “C:\Users\Lam.julia\v0.6\Conda\deps\usr\lib\site-packages\xlrd_init_.py”, line 116, in open_workbook
with open(filename, “rb”) as f:

Stacktrace:
[1] pyerr_check at C:\Users\Lam.julia\v0.6\PyCall\src\exception.jl:56 [inlined]
[2] pyerr_check at C:\Users\Lam.julia\v0.6\PyCall\src\exception.jl:61 [inlined]
[3] macro expansion at C:\Users\Lam.julia\v0.6\PyCall\src\exception.jl:81 [inlined]
[4] #_pycall#67(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:653
[5] _pycall(::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:641
[6] #pycall#71(::Array{Any,1}, ::Function, ::PyCall.PyObject, ::Type{PyCall.PyAny}, ::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:675
[7] pycall(::PyCall.PyObject, ::Type{PyCall.PyAny}, ::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:675
[8] #call#72(::Array{Any,1}, ::PyCall.PyObject, ::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:678
[9] (::PyCall.PyObject)(::String, ::Vararg{String,N} where N) at C:\Users\Lam.julia\v0.6\PyCall\src\PyCall.jl:678
[10] openxl at C:\Users\Lam.julia\v0.6\ExcelReaders\src\ExcelReaders.jl:75 [inlined]
[11] #readxlsheet#3(::Array{Any,1}, ::Function, ::String, ::String) at C:\Users\Lam.julia\v0.6\ExcelReaders\src\ExcelReaders.jl:90
[12] readxlsheet(::String, ::String) at C:\Users\Lam.julia\v0.6\ExcelReaders\src\ExcelReaders.jl:90
[13] include_string(::String, ::String) at .\loading.jl:515

What does this mean? the excel file opens just fine normally by itself on Windows. I dragged it to the Jupyter notebook and then dragged it to the space inside the readxlsheet command.

Any help is appreciated

Thanks


#2

ExcelReaders.jl does not support reading from URLs, you need to pass it a local file name.