Finally, I could not import the .csv file but
LIBNAME mylibname XLSX '\\C:\direction\filemname.xlsx';
worked very well with the correct rows and columns. The hint is that in the data step, I need to specify the Excel sheet that contains the data I want to work on (for me, it was sheet1)
data mydata; set mylibname.sheet1; run;
Another point was that I kept the data the same that was read from the .xlsx file. When I converted the file to SAS data, it changed the type of the variables and I did not want that.
Thank you, everyone!
... View more