|
将DW数据窗口导出为EXCEL文件的方法(整理)(2) //author : hzh //date : 2002.11.05 //************************************************// String s_tempcoltype any a_ret s_tempcoltype = Lower(THIS.Describe(as_colname + ".coltype")) //for string type IF Left(s_tempcoltype,4) = "char" OR Left(s_tempcoltype,4) ="varc"then a_ret = THIS.GetItemString(al_row,as_colname) END IF //for decimal type IF Left(s_tempcoltype,7) = "decimal" then a_ret = THIS.GetItemDecimal(al_row,as_colname) END IF //for date type IF s_tempcoltype = "date" THEN a_ret = THIS.GetItemDate(al_row,as_colname) END IF //for datetime type IF s_tempcoltype = "datetime" THEN a_ret = THIS.GetItemDateTime(al_row,as_colname) END IF //for number type IF s_tempcoltype = "number" THEN a_ret = THIS.GetItemNumber(al_row,as_colname) END IF //for time type IF s_tempcoltype = "time" THEN a_ret = THIS.GetItemTime(al_row,as_colname) END IF //for timestamp type IF s_tempcoltype = "timestamp" THEN a_ret = THIS.GetItemTime(al_row,as_colname) END IF //for int or long IF s_tempcoltype = "int" OR s_tempcoltype = "long" THEN a_ret = THIS.GetItemnumber(al_row,as_colname) END IF IF IsNull(a_ret) THEN RETURN -1 END IF RETURN a_ret end function public function string uf_about (); string s_func = "" s_func = " 1. 求得表达式的值 (uf_evaluate) " +& " 2. 根据 SQL ,创建数据存储 (uf_setsqlselect) ~r~n " +& " 3. 得到任意列的值(uf_getitemvalue) ~r~n " //s_func += SUPER :: uf_about() RETURN "uo_ds_base object member's functions : ~r~n" + s_func end function public function string uf_globalreplace (string as_source, string as_old, string as_new); //**************************************************************//
|