Wichtiger Hinweis: Wenn Sie in Ihrer Infrastruktur keinen Zugriff auf eine Windows-Maschine haben, um diese Komponente zu hosten, kann diese Lösung nicht implementiert werden.
Note : Um mit diesem entfernten Server zu interagieren, wird die EXCELCS-Engine in den Import- und Exportprozeduren verwendet.
/* Export vers Excel */
PROC EXPORT
DATA = ma_lib.mon_dataset
OUTFILE = "C:\Chemin\Vers\Fichier.xlsx" /* Chemin sur le serveur Windows */
DBMS = EXCELCS
REPLACE;
SERVER = "NomDuServeurWindows"; /* ou adresse IP */
PORT = 9621; /* Port par défaut, à vérifier */
SSPI = YES; /* Authentification Windows intégrée */
RUN;
/* Import depuis Excel */
PROC IMPORT
OUT = ma_lib.mon_dataset_import
DATAFILE = "C:\Chemin\Vers\Fichier.xlsx"
DBMS = EXCELCS
REPLACE;
SERVER = "NomDuServeurWindows";
PORT = 9621;
SSPI = YES;
RUN;
1
/* Export vers Excel */
2
PROC EXPORT
3
DATA = ma_lib.mon_dataset
4
OUTFILE = "C:\Chemin\Vers\Fichier.xlsx"/* Chemin sur le serveur Windows */
5
DBMS = EXCELCS
6
REPLACE;
7
SERVER = "NomDuServeurWindows"; /* ou adresse IP */
8
PORT = 9621; /* Port par défaut, à vérifier */
9
SSPI = YES; /* Authentification Windows intégrée */
10
RUN;
11
12
/* Import depuis Excel */
13
PROC IMPORT
14
OUT = ma_lib.mon_dataset_import
15
DATAFILE = "C:\Chemin\Vers\Fichier.xlsx"
16
DBMS = EXCELCS
17
REPLACE;
18
SERVER = "NomDuServeurWindows";
19
PORT = 9621;
20
SSPI = YES;
21
RUN;
DBMS=EXCELCS: Gibt an, dass das Client/Server-Modell für den Zugriff auf PC-Dateien verwendet wird.
SERVER= und PORT=: Geben an, wo sich der PC Files Server befindet.
SSPI=YES: Aktiviert die integrierte Windows-Authentifizierung (Integrated Windows Authentication), wodurch oft die Notwendigkeit entfällt, Passwörter fest zu codieren.
Nicht unterstützte Optionen: Im Gegensatz zu klassischen Import-Engines unterstützen die Engines EXCELCS und PCFILES möglicherweise bestimmte praktische Optionen wie GETNAMES= oder MIXED= nicht. Die Struktur Ihrer Excel-Quelldateien muss sorgfältig beachtet werden.
4. Dokumentation und Installation
Für die Installation und erweiterte Konfiguration (insbesondere für Administratoren) wird empfohlen, die offizielle Dokumentation zu konsultieren:
Beachten Sie insbesondere die Abschnitte zum „LIBNAME Statement“, zur „Pass-Through Facility“ für Linux/Unix und das Kapitel „PC Files Server Administration“.
The codes and examples provided on WeAreCAS.eu are for educational purposes. It is imperative not to blindly copy-paste them into your production environments. The best approach is to understand the logic before applying it. We strongly recommend testing these scripts in a test environment (Sandbox/Dev). WeAreCAS accepts no responsibility for any impact or data loss on your systems.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.