604
社区成员
发帖
与我相关
我的任务
分享
//保存列位置的代码
do while ll_pos>0
ls_name = mid(ls_object,ll_start, ll_pos - ll_start)
ls_text = ldt_temp.describe(ls_name + "_t.text")
ls_x = ldt_temp.Describe(ls_name + ".x")
//判断是否要
if ldt_temp.describe(ls_name + ".band") = "detail" then
ll_row = ldt_col.insertrow( ldt_col.rowcount()+1)
ldt_col.SetItem(ll_row,"zt","显示")
ldt_col.SetItem(ll_row,"col_text",ls_text)
ldt_col.SetItem(ll_row,"col_name",ls_name)
ldt_col.SetItem(ll_row,"col_width",ldt_temp.Describe(ls_name + ".width"))
ldt_col.SetItem(ll_Row,"col_x",long(ls_x)) //X位置
end if
ll_start = ll_pos + 1
ll_pos = pos(ls_object,"~t",ll_start)
loop
//按X位置排序
ldt_col.SetSort("col_x a")
ldt_col.Sort()
//写入文件
ldt_col.SaveAs(ls_FileName,text!,false)
//读取列位置的代码
ll_RowCount = ldt_col.RowCount()
for ll_row = 1 to ll_RowCount
ls_Name = Trim(ldt_Col.GetItemString(ll_Row,"Col_name"))
ls_x = String(ldt_Col.GetItemNumber(ll_Row,"col_x"))
ls_Width = trim(ldt_Col.GetItemString(ll_Row,"col_width"))
ldt_temp.Modify(ls_name + ".x=" + ls_x )
ldt_temp.Modify(ls_name + ".width=" + ls_Width )
next