Why XLSX.readxlsx not working?

I’m trying to read a first column of an excel file (from sheet2 column d2). This is my try:

using XLSX, , DataFrames

xf = XLSX.readxlsx("C:/Data/sample.xlsx")
sh = xf["sheet2"]
sh["d2"]  ; sh[3];  # or any other similar things are not working 


Does anyone know how to read a whole column form specific sheet in an excel file?

xf["Sheet2"][:] maybe? (Notice that your sheet name seems to start with an upper case S)

Hi @Paul_Soderlind xf["Sheet2"][:] shows all the stuff in sheet2. I’d like to assian a parameter all coulmn2 of sheet2

Two ways (at least) to get element 1 of column 2

  1. xf[“Sheet2”][:][1,2]
  2. xf[“Sheet2!B1”]
1 Like
  1. xf[“Sheet2”][:][:,2] is working. Thanks for the help!