Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

Constante entière attendue with VB qlikview

Hello

Ihave i straight table and list selection (Agence),  So i need for every selection value export the table to excel sheet for example

agence 01

agence 02

agence 03

i need to have in my excel file 3 sheet

Capture.PNG

I started with this script :

Sub export_situation()


set val=ActiveDocument.Fields("%ID_AGENCE_CTOS_CLIENT").GetPossibleValues


for i=0 to val.Count-1


ActiveDocument.Fields("%ID_AGENCE_CTOS_CLIENT").Select (val.Item(i).Text)


set objagenceClient = ActiveDocument.GetSheetObject("CH173")


sheetname=val.Item(i).Text


Dim aryExport(val.Count-1,3)



aryExport(i,0) = "objSalesPerYearAndRegion"

aryExport(i,1) = (val.Item(i).Text)

aryExport(i,2) = "A1"

aryExport(i,3) = "data"



Dim objExcelWorkbook 'as Excel.Workbook


Set objExcelWorkbook = copyObjectsToExcelSheet(ActiveDocument, aryExport)






next


end Sub


I have ths errorCapture.PNG

0 Replies