Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
I should remember correctly, QVD exports are not working on TB.
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
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.
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.
I should remember correctly, QVD exports are not working on TB.