導入xls出錯,解決方法 xls导入数据库

ERROR: DBMS type EXCEL (ACCESS) not valid for import.

A similar message for export can occur when exporting. Severalother engines display the same message includingEXCEL97 and EXCEL2000.

In addition, when you use the Import and Export wizards, theExcel engine is not presented as a selection.

For the operating environments listed previously, SAS 9.2 is a64-bit release, while SAS 9.1.3 is a 32-bit release for theseenvironments. The problem occurs because SAS 9.2 is a 64-bitrelease, but the Excel engine (DBMS=EXCEL) is a 32-bit engine. TheXLS engine and the EXCELCS engine are 64-bit engines, so they workon 64-bit systems.

Depending on the requirements of the programs that you arerunning, you can solve this problem in one of two ways, asexplained in the following sections.

Option 1

You can continue to use the 64-bit version ofSAS, which can access more memory (greater than 4 gigabytes) thanthe 32-bit version of SAS. In this case, you need to use 64-bitimport engines (XLS, EXCELCS, and ACCESSCS) to import your PCfiles, as illustrated by the examples that follow later in thissection.

The XLS engine does not require theSAS® PC Files Server, but the engine cannot readMicrosoft Office 2007 files (XLSX, XLSM, and XLSB). In addition,the XLS engine cannot be used with a LIBNAMEstatement. This engine can be used only in the IMPORT and EXPORTprocedures, as shown here:

proc import out=mysasdatadatafile="drive-name:directoryfilename.xls"dbms=xls replace;sheet='sheet-name'; run;proc export data=mysasdataoutfile="drive-name:directoryfilename.xls" dbms=xlsreplace; sheet='sheet-name'; run; quit;

The EXCELCS engine does require the SAS PCFiles Server, and it can read Microsoft Office 2007 files (XLSX,XLSM, and XLSB). This engine can also be used with a LIBNAMEstatement that contains the PCFILES engine. The following examplesillustrate the use of the EXCELCS engine:

proc import dbms=excelcsdatafile='directoryfile.xls'out=sas-data-output-filename replace;sheet='sheet-name';server="server-name.company.com"; port=8621;run;proc export dbms=excelcs data=mysasdataoutfile="directoryfilename.xls" replace;sheet='sheet-name';server="server-name.company.com"; port=8621;run;

You can also access Excel files using the PCFILES engine in aLIBNAME statement, as shown in this example:

libname myref pcfilesserver="server-name.company.com" port=8621path="directoryfilename.xls";

For Microsoft Access files, you must use the SAS PC FilesServer, as shown in these examples:

proc import dbms=accesscsout=sas-data-output-filename replacetable='accessmdb-table-name'; port=8621;server="server-name.company.com";database='directoryfilename.mdb';run;proc export data=sashelp.shoesouttable='accessmdb-table-name' dbms=accesscs replace;database='directoryfilename.mdb';server="server-name.company.com"; port=8621;run;

You can also access Microsoft Access files using the PCFILESengine in a LIBNAME statement, as shown in this example:

libname myref pcfilesserver="server-name.company.com" port=8621path="directoryfilename.mdb";

The SAS PC Files Server is not required in order to use XLSengine, but the XLS engine cannot read Access files.

To use the EXCELCS and ACCESSCS engines, you must install theSAS PC Files Server. For details about how to install and use theSAS PC Files Server as well as for information about how otherformats work, see the following documentation:

Option 2

You can leave the 64-bit version of SAS installed and alsoinstall the 32-bit version of the SAS®System for Windows so that PROC IMPORT and PROC EXPORT work withExcel and Access files the same as they do in SAS 9.1.3. However,the 32-bit version is limited to 4 gigabytes of memory. Bothversions can be installed on the same machine and do not interferewith each other.



導入xls出錯,解決方法 xls导入数据库

Operating System and Release Information

Product FamilyProductSystemSASRelease
ReportedFixed*
SAS SystemSAS/ACCESS Interface to PC FilesMicrosoft Windows XP 64-bit Edition9.2 TS1M0
* For software releases that are not yetgenerally available, the Fixed Release is the software release inwhich the problem is planned to be fixed

  

爱华网本文地址 » http://www.413yy.cn/a/25101012/126824.html

更多阅读

解酒的最快方法是什么,最全方法 快速解酒简单快方法

解酒的最快方法是什么,最全方法——简介我告诉大家几个解酒小方法了:解酒的最快方法是什么,最全方法——方法/步骤解酒的最快方法是什么,最全方法 1、1`喝蜜水;取蜂蜜一匙,用开水冲服。解酒的最快方法是什么,最全方法 2、2`吃柚子;将柚子

笔记本键盘打不出字,笔记本键盘失灵怎么办 笔记本键盘失灵

笔记本键盘打不出字,笔记本键盘失灵怎么办——简介 有一些刚买笔记本的朋友,对笔记本不是太熟悉,刚买回来觉得好好的,可是之后觉打不出字来了,按了一个外接键盘却可以,那么为什么笔记本键盘打不出字呢,小编给大家收集了相关的资料,希望能帮

声明:《導入xls出錯,解決方法 xls导入数据库》为网友哥是你用不起分享!如侵犯到您的合法权益请联系我们删除