將sas dataset 匯出至Excel格式

2022-07-11 07:30:14 字數 2522 閱讀 1953

ods excel file="&filepath..xlsx"

options(

absolute_column_width='none'      /*列寬*/

absolute_row_height='20'              /*行高*/

center_horizontal= 'off'         

center_vertical= 'off'

embed_footnotes_once='yes'        /*新增腳注*/

embedded_titles='on'                    /*新增title*/

frozen_headers='on'                     /*首行凍結*/

gridlines='off'                                /*關閉網格線*/

rowcolheadings='on'                     /*顯示每個變數的label為表頭*/

sheet_name="事件"                      /*將sheet命名*/

);title "列表";

footnote "*日期";

proc report data=final nowd;

column col1-col21;

run;

ods excel close;

來自網友fiona33322的**:

proc template;

define style styles.test;

parent=styles.sasweb;

replace document from container /

protectspecialchars =off

;end;

run;

title;

ods noproctitle;

ods listing close;

ods results off;

ods excel file="&root\output\medical review_&date..xlsx" style=styles.test;

ods excel options(  sheet_interval='none' suppress_bylines='no' embedded_titles='yes' sheet_interval='none'

sheet_name="表3-1)ae計數表"

/*                                   absolute_column_width='15'  */

gridlines='yes'  autofilter='yes'

frozen_headers='0' embedded_titles='yes');

proc report data=mrf.t31 split="|" style(report)= style= ;

run;

ods excel close;

ods listing;

ods results;

來自網友可~樂~的**:

proc template;

define style formatstyle;

parent = styles.listing; 

style systemtitle /

font_face = "times new roman"

font_size = 2.5

font_style = roman

foreground = black

background = white;

style header /

background = white

foreground = blcak

font_face = "times new roman"

font_style = roman

just = center

vjust = middle

font_size = 2.5;

style cell /

background = white

foreground = black

font_face = "times new roman"

font_weight = light

font_style = roman

just = center

vjust = middle

font_size = 2.5;

style table /

rightmargin=3.17cm

leftmargin=3.17cm

topmargin=2.54cm

bottommargin=2.54cm

cellspacing = 0

cellpadding = 2

frame = void

rules = none

outputwidth = 925;

end;

run;

使用PHPExcel將資料匯出至Excel

解壓後將classes資料夾移動到thinkphp的extend目錄,並將其重新命名為phpexcel 在專案中需要的地方新增引用 import phpexcel.phpexcel extend path use think controller class excel extends contro...

將JavaWeb專案上傳至阿里雲伺服器ECS

第一步 學生建議使用優惠產品,每個月9.9,便宜。我這裡使用centos 7.3 64位 linux作業系統 下面說下在搭執行環境中踩到的坑。第二步 這裡需要兩個輔助軟體xhell和filezilla。xhell終端模擬軟體,連線上esc後,像操作linux一樣操作就好了 filezilla功能強大...

將excel檔案中的資料匯入匯出至SQL資料庫

dim conn,connstr connstr driver uid sa pwd database tushu server sql2005 set conn server.createobject adodb.connection conn.open connstr 此處為excel2007,...