BookmarkSubscribeRSS Feed
msbrvamsi
Calcite | Level 5

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.

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

snoopy369
Barite | Level 11

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 372 views
  • 1 like
  • 3 in conversation