Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot add fields to TableBox using the automation interface

I try to use Automation interface to create tablebox and add fields to it from a simple external program written in c#.
I use QlikView type library integrated in the QlikView.exe file.

TableBox table = app.ActiveDocument().ActivateSheet("Main").CreateTableBox();
app.ActiveDocument().DoReload(1, false, false);

After reloading data, I have two fields (apart from system fields) available in my ActiveDocument: "col_id" and "name".
I've checked it using IArrayOfFieldDescription object. Then I try to add both fields to the tableBox:
table.AddField("col_id");
Ok, no error. Then i try to add second field:
table.AddField("name");
or e.g. remove the first field: table.RemoveField(0);
or table.GetField(0);
These all result in "W wyniku wywo?ania sk?adnika modelu COM zosta? zwrócony b??d HRESULT E_FAIL." error.

0 Replies