Hi Guys,
i am not able to import xlsx, xls file types from my server or local folders can someone suggest the reason for the error.
ERROR: DBMS type EXCEL not valid for export.
Do we need any licence to import external files of xls and xlsx.
Thanks in advance.
Please clarify exactly what your question is, supply example code and such like to illustrate this. Your thread topic of (shouted) PROC IMPORT, doesn't convey anything, and conflicts with what you have posted in the body, as the Error is telling you something about export. So which is it import or export? For XLS fles, which are MS proprietary binary files, you need with MS Office installed on the machine where the file is created or pcfiles server. For XLSX which is MS Open Office zipped XML format, if you have the latest SAS 9.4 release then you can use libname excel to read an write from these. If you don't have the latest version then you again need Office or pcfiles server present.
Take this as one very good reason why you should avoid at all costs proprietary file formats - especially compiled binary ones. Use plain text CSV or XML and you will have none of these issues as its cross platform plain text, well structured and easy to use.
To use PROC EXPORT or PROC IMPORT with EXCEL, you need ACCESS to PC FILES. You can run PROC SETINIT to see if you have that licensed. You also have to be running on Windows.
You have other options if you are not on Windows - XLSX will work on other operating systems, or you can use a PC Files Server with EXCELCS.
If you don't license ACCESS to PC FILES, you can use ODS EXCEL to export files, but that's not a solution for importing them. For import you may want to use a third party product, or just go into Excel and save to CSV.
Also, in the future I recommend searching on your error first. Doing so (in Google, no less) found this thread as its first hit for me:
https://communities.sas.com/t5/SAS-Procedures/ERROR-DBMS-type-EXCEL-not-valid-for-export/td-p/249383
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: