Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Manipulation Straight Table (Sort, Width, Delete)

Hello,

I am trying to build a Straight Tables via a macro, given that depending on the user selection, a different table needs to be loaded each time, at the same location.

One of the issues is that given that situation, I would like to delete the past table, before creating a new table with same Object ID (the same ID is required for fuctionality of the document).

Based on the GetObject statement I tried "ActiveDocument.RemoveSheetObject("Table")".

What is the correct syntax to delete a sheet object ?

Also there is one column where I need to sort via a custom order.

Hence I used:

     Table.GetProperties.Dimensions.Item(0).SortCriteria.SortByExpression = 1

     Table.GetProperties.Dimensions.Item(0).SortCriteria.Expression.v = "=Match([Current State] , 'Submitted'" , 'Analysis Started')"

What is the correct way to phrase this ?

Lastly if possible, I would like to auto-width the columns, similar to manually selecting "Fit Columns To Data"

Is this possible, or do I need to set the column width manually to a fixed value ?

Thank you for your help

1 Reply
Not applicable
Author

hi

plz. see the link.

hope it will help you..

http://community.qlik.com/thread/58846

http://community.qlik.com/thread/10900

thanks