Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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?

14 Replies
souadouert
Specialist
Specialist
Author

m w can i use the function mid() in the module?

m_woolf
Master II
Master II

Yes

You want to do something like:

mid(val.Item(i).Text,4,10)

souadouert
Specialist
Specialist
Author

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

for i=0 to val.Count-1

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

set obj = ActiveDocument.GetSheetObject("CH173")

set String=(val.Item(i).Text)

TITRE=Instr(String,1,3)

    obj.ExportEx "C:\Users\04488\Desktop\Vision\straight"& TITRE& ".qvd",4

next

i use this script biiut i have error Object required: '[string: "12/2015"]'

m_woolf
Master II
Master II

If you are trying to store val.Item(i).Text in a variable:

String=val.Item(i).Text


I don't know what you are trying to do with TITRE=Instr(String,1,3)


souadouert
Specialist
Specialist
Author

i need a function like mid

the file name is mid(val.Item(i).Text,5,2)

for exemple: the selection 2017/10
i need to extract only10obj.ExportEx "C:\Users\04488\Desktop\Vision\straight"& TITRE& ".qvd",4

straight10.qvd