3 Replies Latest reply: Jul 6, 2016 9:48 AM by Sasidhar Parupudi RSS

    Add SheetObject (Straight-Table) to Container with Macro

    Florian Salfenmoser

      Hello together,


      I´m trying to add a straight-table Object to a Container-Object with a Macro. The API-Guide provides the following example for this:


      Set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer

      set ContProp=ContainerObj.GetProperties






      ContProp.ContainedObjects.Item(0).Id = "Document\CH02"

      ContProp.ContainedObjects.Item(0).Text.v = "Bar"


      ContProp.ContainedObjects.Item(1).Id = "Document\CH01"

      ContProp.ContainedObjects.Item(1).Text.v = "StraightTable"

      ContainerObj.SetProperties ContProp


      If I try to run the macro, I get an Error at the line "ContProp.ContainedObjects.Item(0).Id" with the Message


      "Object does not support this this Property or Method: 'ContProp.ContainedObjects.Item(...).Id'


      I´m currently using QlikView 11.20 SR 13. Did anybody get a similar macro to run or has an Idea why it fails ? Unfortunatelly the API-Guide is not complete for working with Containers, I don´t know where to get further Infomation about that.


      I attached an example with two charts an the macro, which anybody could try.


      Thanks in Advance !


      Best Regars