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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

export qvd macros

i have cross table  and liste selection date, i need to create macros that turn over the liste select , and in each value , export this cross table as qvd file with one selection for this liste

it s possible?

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Doesn't val.Item(i).Text give you a different name?

Maybe:

obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(" & val.Item(i).Text & ").qvd",4

View solution in original post

14 Replies
m_woolf
Master II
Master II

This code from the API cycles through the possible values in a field:

set val=ActiveDocument.Fields("Month").GetPossibleValues

for i=0 to val.Count-1

    msgbox(val.Item(i).Text)  ' change this line to select each value

' Add code here to store to qvd

next

souadouert
Specialist
Specialist
Author

HELLO M W,

how to select the object tablecross ??

souadouert
Specialist
Specialist
Author

ActiveDocument.GetSheetObject( ref) , i knowed this funtion but how to store the table with the selection item

m_woolf
Master II
Master II

This is also from the API Guide:

set cs = ActiveDocument.GetSheetObject("CS03")

cs.ServerSideExportEx "C:\test.html" , ";" , 0 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF     

souadouert
Specialist
Specialist
Author

set val=ActiveDocument.Fields("Date").GetPossibleValues

for i=0 to val.Count-1

set cs = ActiveDocument.GetSheetObject("ch10")

cs.ServerSideExportEx "nomfichier.qvd"

next
but with th store i need to store table with for each selection values possible , as if i selecte value of selection date and i stored the table , and after that the next value and i stored

m_woolf
Master II
Master II

I assume that means you will want a different name for each qvd?

souadouert
Specialist
Specialist
Author

I want to automate a task, I have a table, for the set of value of the selection date: I select a date and I export the table as qvd, I need to automate the task, export the table as many value of the selection, each time I select the date and I export

souadouert
Specialist
Specialist
Author

set val=ActiveDocument.Fields("AGENCE").GetPossibleValues

for i=0 to val.Count-1

ActiveDocument.Fields("AGENCE").Select (val.Item(i).Text)  

set obj = ActiveDocument.GetSheetObject("CH02")

    obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(val.Item(i).Text).qvd",4

  

next

this script working but i need different name for each qvd

m_woolf
Master II
Master II

Doesn't val.Item(i).Text give you a different name?

Maybe:

obj.ExportEx "C:\Users\04488\Desktop\Vision\straight(" & val.Item(i).Text & ").qvd",4