Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

souadouert
Contributor III

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
mwoolf
Honored Contributor II

Re: export qvd macros

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

14 Replies
mwoolf
Honored Contributor II

Re: export qvd macros

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
Contributor III

Re: export qvd macros

HELLO M W,

how to select the object tablecross ??

souadouert
Contributor III

Re: export qvd macros

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

mwoolf
Honored Contributor II

Re: export qvd macros

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
Contributor III

Re: export qvd macros

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

mwoolf
Honored Contributor II

Re: export qvd macros

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

souadouert
Contributor III

Re: export qvd macros

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
Contributor III

Re: export qvd macros

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

mwoolf
Honored Contributor II

Re: export qvd macros

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

Community Browser