<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Macro Manipulation Straight Table (Sort, Width, Delete) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Manipulation-Straight-Table-Sort-Width-Delete/m-p/463134#M172934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;Based on the GetObject statement I tried "ActiveDocument.RemoveSheetObject("Table")".&lt;/P&gt;&lt;P&gt;What is the correct syntax to delete a sheet object ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also there is one column where I need to sort via a custom order.&lt;/P&gt;&lt;P&gt;Hence I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table.GetProperties.Dimensions.Item(0).SortCriteria.SortByExpression = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table.GetProperties.Dimensions.Item(0).SortCriteria.Expression.v = "=Match([Current State] , 'Submitted'" , 'Analysis Started')" &lt;/P&gt;&lt;P&gt;What is the correct way to phrase this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly if possible, I would like to auto-width the columns, similar to manually selecting "Fit Columns To Data"&lt;/P&gt;&lt;P&gt;Is this possible, or do I need to set the column width manually to a fixed value ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Dec 2012 10:55:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-24T10:55:16Z</dc:date>
    <item>
      <title>Macro Manipulation Straight Table (Sort, Width, Delete)</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Manipulation-Straight-Table-Sort-Width-Delete/m-p/463134#M172934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;Based on the GetObject statement I tried "ActiveDocument.RemoveSheetObject("Table")".&lt;/P&gt;&lt;P&gt;What is the correct syntax to delete a sheet object ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also there is one column where I need to sort via a custom order.&lt;/P&gt;&lt;P&gt;Hence I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table.GetProperties.Dimensions.Item(0).SortCriteria.SortByExpression = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table.GetProperties.Dimensions.Item(0).SortCriteria.Expression.v = "=Match([Current State] , 'Submitted'" , 'Analysis Started')" &lt;/P&gt;&lt;P&gt;What is the correct way to phrase this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly if possible, I would like to auto-width the columns, similar to manually selecting "Fit Columns To Data"&lt;/P&gt;&lt;P&gt;Is this possible, or do I need to set the column width manually to a fixed value ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 10:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Manipulation-Straight-Table-Sort-Width-Delete/m-p/463134#M172934</guid>
      <dc:creator />
      <dc:date>2012-12-24T10:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Manipulation Straight Table (Sort, Width, Delete)</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Manipulation-Straight-Table-Sort-Width-Delete/m-p/463135#M172935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;plz. see the link.&lt;/P&gt;&lt;P&gt;hope it will help you..&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/thread/58846" title="http://community.qlik.com/thread/58846"&gt;http://community.qlik.com/thread/58846&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/thread/10900" title="http://community.qlik.com/thread/10900"&gt;http://community.qlik.com/thread/10900&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 11:06:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Manipulation-Straight-Table-Sort-Width-Delete/m-p/463135#M172935</guid>
      <dc:creator />
      <dc:date>2012-12-24T11:06:24Z</dc:date>
    </item>
  </channel>
</rss>

