As Tom notes in comments, make sure to check this is really an xlsx file but assuming it is, some suggestions for dealing with it.Ĭopying it over by hand like you're doing is doable, and I'll put some code that works at the bottom of the answer, but it's way overkill nowadays - you're probably reading decade-old papers from before the modern day of SAS. You'll definitely need to download the file. As I mentioned I am new to SAS so trying to access the API seemed like it would be too difficult at the moment. Using the Box API from within SAS would also be another option if anyone has successfully gotten that to work. I can obviously write a script that will fetch the updated files and write them to the server where SAS can access them as needed, but wanted to see if I could get this to work first. So if this won't work I am also interested in other work arounds that would accomplish the same thing. The reason I'd like to do it this way is because the files at the static links are updated daily and I want to avoid having to copy files to the SAS server every day. See SAS Log for details.Īny help would be appreciated. Please open it in Excel and Save as V5 or laterĮRROR: Import unsuccessful. I get the following error: Spreadsheet isn't from Excel V5 or later. PROC IMPORT OUT= input DATAFILE= "file_name.xlsx" Infile xlsxFile recfm=s nbyte=n length=len Is there an easy way to have SAS access files from this type of URL? I've checked these few threads:Īnd it seems like I may need to do some work to get SAS to create a file object from the URL but I don't quite understand how the code is working and when I naively try something similar: filename xlsxFile http "" Please copy the file to local disk before running the I get ERROR: This "filename URL" access method is not supported by "proc import". SAS tries to look for a document with the name "". I'm hoping to do something similar in SAS. In python, I can read an xlsx file from a static Box.com link by calling pandas read excel function on the Box link. I am new to SAS but used to working in python.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |