Magic Number PK

Hello, so I have no coding background, but have to use RStudio for my college stats class. My professor cannot help me either. I am getting this error message whenever I am trying to upload an xlsx file:

load("~/Desktop/Lab4_education_data.xlsx")
Error in load("~/Desktop/Lab4_education_data.xlsx") :
bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘Lab4_education_data.xlsx’ has magic number 'PK'
Use of save versions prior to 2 is deprecated

I have read other articles on how to fix this, but I don't know code, so if someone could give me clear step-by-step instructions, that would be greatly appreciated. I am also working off of a mac, and have the latest RStudio version.

load() is a function for loading RData files that have been written out by save(). Excel files dont fit the bill.
Ypu.will need a package like readxl or openxls or perhaps readr has a basic excel read function.

Thank you for responding.

How do I get readxl?

read all about that here :
Read Excel Files • readxl (tidyverse.org)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.