在pb中实现EXCEL筛选功能

Excel中通过标题自动筛选很方便,其实pb中也可以实现,减少了程序中筛选输入中的繁琐,简单实现代码如下。

Int ll_count , ll_col ,ll_nextcol , ll_x , ll_width , ll_newx , ll_height
String ll_visible ,  ll_colname , ls_return

ll_height = Integer(This.Describe("DataWindow.Header.Height")) -16
ll_count = Integer(This.Describe("DataWindow.column.count"))
For ll_col = 1 To ll_count
    ll_visible = This.Describe("#"+String(ll_col)+".Visible")
    ll_x = Integer(This.Describe("#"+String(ll_col)+".x"))
    ll_width = Integer(This.Describe("#"+String(ll_col)+".width"))
    ll_colname = This.Describe("#"+String(ll_col)+".name")
    If ll_visible <> '0' Then
        ll_newx = ll_x + ll_width - 50

        ls_return = This.Modify( &
            "create text(band=header alignment='0' text='6'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值