Création d'archive avec ODS package
par , 05/08/2015 à 18h43 (1231 Affichages)
Bonjour,
Je partage ces méthodes:
Cordialement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77/*Creation d'une archive*/ /*ods tagsets excelxp*/ %let date=&sysdate; ods package open nopf; ods tagsets.excelxp style=styles.sasweb file=" c:\sas\BASEUL&sysdate..xls" package; ods listing close; ods tagsets.excelxp options (sheet_name = ' apprentis ' sheet_interval="none" autofit_height = 'yes' ); proc report data=sashelp.class nowd style(column) = [cellwidth = 2.5 cm just = c vjust = m] style (header) = [just = c vjust = m ]; title ; column name age sex weight height; define name / "name" style(column)= [cellwidth = 2cm]; ; define age / " age " style(column)= [cellwidth = 5cm]; define sex / "Sex" ; define weight / "weight" ; define height / "height" ; run; ods tagsets.excelxp close; ods package publish archive properties (archive_name="dossier.zip" archive_path="c:\sas\"); ods package close clear; /*Ods html*/ ods listing close; goptions dev=gif xpixels=480 ypixels=320; ods package open; ods html package; proc gplot data=sashelp.class; plot height*weight; by name; run; quit; ods html close; ods package publish archive properties(archive_name="SimpleExample.zip" archive_path="c:\sas\"); ods package close; ods listing; /*Création archive en ajoutant fichiers*/ filename newtxt "c:\sas\dossier\test.txt"; filename newexcel "c:\sas\dossier\test.xls"; filename new "c:\sas\dossier\report.xls"; ods package(newzip) open nopf; ods package(newzip) add file=newexcel path="Excel/"; ods package(newzip) add file=new path="Excel/"; ods package(newzip) add file=newtxt path="txt/"; ods package(newzip) publish archive properties( archive_name="test.zip" archive_path="c:\sas\dossier\" ); ods package(newzip) close;









