Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: Macro export table ("TB01") to QVD not working

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

4 Replies
schlettig
Contributor

Re: Macro export table ("TB01") to QVD not working

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

Re: Macro export table ("TB01") to QVD not working

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

Re: Macro export table ("TB01") to QVD not working

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

Re: Macro export table ("TB01") to QVD not working

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

Community Browser