|
将DW数据窗口导出为EXCEL文件的方法(整理)(4) end prototypes type variables Private: //存储要导出的数据 uo_ds_base ids_data //列名 String is_columnname[] //列的标题 String is_columntitle[] //列的显示格式 String is_columnformat[] //列的类型 String is_columntype[] end variables forward prototypes public function integer uf_toexcel (datastore ads_data, readonly string as_title) public function integer uf_toexcel (datawindow adw_data, readonly string as_title) private function integer uf_setdatasource (datawindow adw_data) private function integer uf_setdatasource (datastore ads_data) private function integer uf_datatoexcel (string as_title) public function string uf_about () private function integer uf_initcolumn () end prototypes public function integer uf_toexcel (datastore ads_data, readonly string as_title); /**********************************************************/ //Function : 转换数据到 excel //parm : // 1. ads_data : 包含源数据的对象 // 2. as_title : excel 的标题 //return : 1 is success and -1 is fail //Author : hzh //date : 2003.12.08 /**********************************************************/ IF THIS.uf_setdatasource(ads_data) <> 1 THEN RETURN -1 IF NOT IsValid(ids_data) THEN RETURN -1 IF ids_data.RowCount() < 1 THEN RETURN -1 THIS.uf_initcolumn() THIS.uf_datatoexcel(as_title)
|