Pratique de Sas Windows ...9.3 Volume 2 - Ined
Pratique de Sas Windows ...9.3 Volume 2 - Ined
Pratique de Sas Windows ...9.3 Volume 2 - Ined
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.2.2.2 Ecriture en Excel 32bits à partir <strong>de</strong> <strong>Sas</strong> 9.3.2 64bits<br />
• Métho<strong>de</strong> proc<br />
proc export dbms=excelcs data=<strong>Sas</strong>help.class<br />
outfile="d:\tab<strong>Sas</strong>64\clasexp2010.xlsx" replace;<br />
sheet="class";<br />
run;<br />
Cependant, malgré l’exécution correcte mentionnée par la log, vous n’avez pas créé un vrai fichier .xslx<br />
(implicitement zippé)<br />
Avec le changement <strong>de</strong> suffixe, vous créerez un vrai fichier excel 2010 binaire.<br />
proc export dbms=excelcs data=<strong>Sas</strong>help.class<br />
outfile="d:\tab<strong>Sas</strong>64\clasexp2010.xlsb" replace;<br />
* port=9621; *server="pc_01378";<br />
sheet="class";<br />
run;<br />
Si le besoin s’en fait sentir, vous pourrez créer un fichier excel <strong>de</strong> version antérieure<br />
proc export dbms=excelcs data=<strong>Sas</strong>help.class<br />
outfile="d:\tab<strong>Sas</strong>64\clasexp2003.xls" replace;<br />
sheet="class";<br />
run;<br />
• Métho<strong>de</strong> libname<br />
indique cet état au sein d’Excel 2010<br />
libname aaa "d:\tab<strong>Sas</strong>64\";<br />
libname eee pcfiles path="d:\tab<strong>Sas</strong>64\finalcourt.xls" ;<br />
data eee.final;<br />
set aaa.final(obs=3000);<br />
run;<br />
libname eee clear;<br />
65 libname eee pcfiles path="d:\tab<strong>Sas</strong>64\finalcourt.xls" ;<br />
NOTE: Libref EEE was successfully assigned as follows:<br />
Engine: PCFILES<br />
Physical Name: d:\tab<strong>Sas</strong>64\finalcourt.xls<br />
66 data eee.final;<br />
67 set aaa.final(obs=3000);<br />
68 run;<br />
NOTE: Format REA was not found or could not be loa<strong>de</strong>d.<br />
NOTE: Format RSA was not found or could not be loa<strong>de</strong>d.<br />
NOTE: Les libellés, formats et longueurs <strong>de</strong>s variables <strong>Sas</strong> ne sont pas copiés dans les tables SGBD.<br />
NOTE: There were 3000 observations read from the data set AAA.FINAL.<br />
NOTE: The data set EEE.final has 3000 observations and 13 variables.<br />
NOTE: L'étape DATA used (Total process time):<br />
real time<br />
cpu time<br />
0.65 secon<strong>de</strong>s<br />
0.01 secon<strong>de</strong>s<br />
Cependant, comme nous passons par l’odbc dans une situation hybri<strong>de</strong>, vous pouvez vous attendre à <strong>de</strong>s<br />
problèmes, comme par exemple ce message un peu sybillin, n’apparaissant plus si on limite la lecture à 3000<br />
observations. Même erreur en proc export.<br />
ERROR: During insert: [Microsoft][Pilote ODBC Excel] Vous ne pouvez pas enregistrer vos<br />
modifications, car une valeur que vous avez entrée viole les paramètres définis pour cette<br />
table ou cette liste (par exemple, une valeur est inférieure ou supérieure à la valeur<br />
maximale). Corrigez cette erreur et réessayez.<br />
NOTE: The <strong>Sas</strong> System stopped processing this step because of errors.<br />
NOTE: There were 4000 observations read from the data set AAA.FINAL.<br />
proc export dbms=excelcs data=aaa.final(firstobs=16000 obs=17000)<br />
outfile="d:\tab<strong>Sas</strong>64\final.xlsb" replace;<br />
sheet="final incomplet";<br />
run;<br />
Pour approfondir, lisez peut-être http://support.microsoft.com/kb/942976/fr<br />
208 <strong>Pratique</strong> <strong>de</strong> <strong>Sas</strong> windows ….93 <strong>Volume</strong> 2 et Coll.