|
将DW数据窗口导出为EXCEL文件的方法(整理)(3) //function : 用指定的字符串替换指定字符串 //parm : // 1. as_source : 原来的字符串 // 2. as_old : 将要被替换的字符串 // 3. as_new : 用来替换的字符串 //return : 新的字符串 //author : hzh //date : 2002.11.14 //*************************************************************// Long l_newlen, l_oldlen, l_start String s_null, s_source IF IsNull(as_source) OR IsNull(as_old) OR IsNull(as_new) THEN SetNull(s_null) RETURN s_null ELSE l_oldlen = Len(as_old) l_newlen = Len(as_new) as_Old = Lower(as_old) s_Source = Lower(as_source) END IF
l_start = Pos(s_source, as_old) DO WHILE l_start > 0 as_source = Replace(as_source, l_start, l_oldlen, as_new) s_source = Lower(as_Source) l_start = Pos(s_source, as_old, (l_start + l_newlen)) LOOP RETURN as_source
end function on uo_ds_base.create call super::create TriggerEvent( this, "constructor" ) end on on uo_ds_base.destroy TriggerEvent( this, "destructor" ) call super::destroy end on ----------------------------------------------------------------- $PBExportHeader$nvo_excel.sru $PBExportComments$和 excel 通讯的功能函数 forward global type nvo_excel from nonvisualobject end type end forward
global type nvo_excel from nonvisualobject end type global nvo_excel nvo_excel type prototypes Private: Function uint GetModuleFileNameA(ulong hModule,ref string lpFilename,ulong nSize) Library "kernel32.dll"
|