ct.Visible = True END IF
long ll_colnum,ll_rownum constant long wdWord9TableBehavior = 1 constant long wdAutoFitFixed = 0 constant long wdCell = 12 string ls_value pointer oldpointer
oldpointer = SetPointer(HourGlass!)
string ls_objects,ls_obj,ls_objs[],ls_objtag[] long ll_pos,ll_len,ll_num = 0
ls_objects = trim(adw.Describe('datawindow.Objects'))
do while (pos(ls_objects,"~t") > 0) ll_pos = pos(ls_objects,"~t") ll_len = ll_pos - 1 ls_obj = left(ls_objects,ll_len) if (adw.Describe(ls_obj + '.type') = 'column' or & adw.Describe(ls_obj + '.type') = 'compute') and & (adw.Describe(ls_obj + '.band') = 'detail') and (ls_obj <> "asd") then ll_num += 1 ls_objs[ll_num] = ls_obj ls_objtag[ll_num] = adw.Describe(ls_obj + '.tag') end if ls_objects = right(ls_objects,len(ls_objects) - ll_pos) loop
//得到数据窗口数据的列数与行数(行数应该是数据行数 + 1) ll_colnum = ll_num ll_rownum = adw.rowcount() + 1
ole_object.Documents.Add() ole_object.ActiveDocument.Tables.Add(ole_object.Selection.Range, ll_rownum, ll_colnum)
string ls_colname integer i,j,k
for i = 1 to ll_colnum //得到标题头的名字 ls_value = ls_objtag[i] ole_object.Selection.TypeText(ls_value) for k = 1 to f_cncharnum(ls_value) ole_object.Selection.TypeBackspace() next ole_object.Selection.MoveRight(wdCell) next
adw.setredraw(false) ole_object.Selection.MoveLeft(wdCell) string colum上一页 [1] [2] [3] [4] [5] 下一页
|