Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
give the macro code please
how to increase the table coloum width in tabular chart conditionally [i.e when i click the button the table coloum width need to increase]
Have you tried APIGUIDE.qvw in your QlikView instalation Directory?
I got this example there:
sub WIDTH_TEST
dim w(3)
w(1)=100
w(2)=150
set tb = ActiveDocument.Sheets("Principal").CreateTableBox
tb.AddField "Class"
tb.AddField "Member"
tb.AddField "MemberComment"
tb.SetPixWidths 0,w
end sub
best regards,
Fernando D'Agosto
Have you tried APIGUIDE.qvw in your QlikView instalation Directory?
I got this example there:
sub WIDTH_TEST
dim w(3)
w(1)=100
w(2)=150
set tb = ActiveDocument.Sheets("Principal").CreateTableBox
tb.AddField "Class"
tb.AddField "Member"
tb.AddField "MemberComment"
tb.SetPixWidths 0,w
end sub
best regards,
Fernando D'Agosto
Hi fernando ,
i have all ready created the table box with the created the table object TB01. how to increase the coloum widths by clicking the buttons. can you give macro for this tabular object i am new to qlik view
hi sgoradia,
you can modify fernando's code a bit to suit your requirement
sub xyz
dim tbl
set tbl = Application.ActiveDocument.GetSheetObject("TB01")
dim w(3)
w(1)=100
w(2)=150
tbl.SetPixWidths 0,w
tbl.SetPixWidths 1,w
end sub
thanks
HI Tauqueer
thanks for your code
i modified the code but i am getting one problem i have seven coloum the last coloum width is not changing can you please advise how can i do this.
Hi,
The function
tbl.SetPixWidths A,B
has two parameters:
A: First column number (0 based) to be formatted
B: Width in pixels for each column
I think the problem with the last column is happening because it starts counting on 0!
Hope it helps!
Fernando ![]()
hi fernado
thanks for you code
but i am getting a problem like when i given the coloum no is 6 it increase the width of the first coloum and the coloum no 0 all so increasing the width of first coloum
can you advise me please on this regards
thanks in advance
sub WIDTH_TEST3
set table = ActiveDocument.getSheetObject("TB03")
dim w(7)
w(1)=-100
w(2)=-100
W(3)=200
W(4)=-100
W(5)=-100
W(6)=-100
W(7)=-100
table.SetPixWidths 0,w
end sub