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 export table ("TB01") to QVD not working

Hi, I have two similar macro's one works the other not. Can someone explain what I'm doing wrong, Thanks.

The one here works:

Sub ExportLocalFactuurOmzetCH02

set obj = ActiveDocument.GetSheetObject("CH02")

obj.Export "C:\Users\Public\Documents\BronTabellenQVDs\Verzameling\toenamepercentageSAP.qvd", 4   

End Sub

The one here does not work:    

Sub ExportLocalTB01

set obj = ActiveDocument.GetSheetObject("TB01")

obj.Export "C:\Users\Public\Documents\BronTabellenQVDs\Verzameling\toenamepercentageSAP.qvd", 4

  End Sub

1 Solution

Accepted Solutions
Not applicable
Author

I should remember correctly, QVD exports are not working on TB.

View solution in original post

4 Replies
schlettig
Partner - Creator
Partner - Creator

Hi Maurits,

strange this should work on a table box as you wrote.

Try eg:

set tb = ActiveDocument.Sheets("Main").CreateTableBox

tb.AddField "Class"

tb.AddField "Member"

tb.Export "C:\test.skv",";"

and see if that works. It's the example from the api guide.qvw, which contains the most complete documentation of the object model.

Or try tb.ExportEx "path\to\file"

Best regards,

Christian

Not applicable
Author

Hello Christian, your first solution works.

It's not exactly what I was looking for (downside you have to create the Table in macro), but thank you.

Not applicable
Author

Hi Maurtis, My first concern is Why you are using the Macro to convert the TableBox object into QVD ?

Generally, there is no expression on TB. So try to create the TB table in the script and directly convert the the table into QVD.

Not applicable
Author

I should remember correctly, QVD exports are not working on TB.