Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
robert_dolezych
Contributor II
Contributor II

How to export a table using macro embeded in the script

Hallo Community!

What is wrong with the process?

Macro:

Function ExTB()
dim ex
set ex = ActiveDocument.GetSheetObject("TB01")
ex.ExportHTML "C:\EntwicklungTests\TB01.html"
end Function

Script:

LOAD DRG_Code, DRG_Typ, DRG_Bezeichnung, DRG_Partition
FROM (qvd);
let ExTB = ExTB();


I am not getting an error message, but it does not work.


I have tried somthing like follows too:

Macro:
Sub TBex
set ex = ActiveDocument.GetSheetObject("TB01")
ex.ExportBiff "C:\EntwicklungTests\TB01.xls"
end Sub

Script:
LOAD
DRG_Code, DRG_Typ, DRG_Bezeichnung, DRG_Partition
FROM (qvd);

call TBex();

Than I am getting the message:
Fehler in Skriptzeile: (error in the script line)

call TBex()

I am perplexed because the both macros are working perfectly, when testing in the macro editor and I suppose the question is solved many times but I did not find the right thread.

1 Solution

Accepted Solutions
robert_dolezych
Contributor II
Contributor II
Author

What helps mostly is reading. I have found everything in the QV help file.

The solution is not in the script!

Settings → Document Properties → Triggers …

View solution in original post

1 Reply
robert_dolezych
Contributor II
Contributor II
Author

What helps mostly is reading. I have found everything in the QV help file.

The solution is not in the script!

Settings → Document Properties → Triggers …