Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Priyanka1902
Contributor II
Contributor II

add multiple connection name from excel sheet

Hi All,

Multiple connections are already created in qliksense. I have those connection name in excel sheet(Connection.xlsx) like

ConnectionName

Connection1

Connecton2

Connection3

Now I need to read these connection name from "Connection.xlsx" and include them in Qlik script like

LIB CONNECT TO 'Connection1';

LIB CONNECT TO 'Connection2';

LIB CONNECT TO 'Connection3';

 

Can anyone please suggest how I write script to include all connections?

Thanks.

 

Labels (3)
1 Solution

Accepted Solutions
Or
MVP
MVP

Load * Inline [
Connection
Connection1

Connection2

];

For each i in FieldValueList('Connection')
LIB CONNECT TO '$(i)';

// Add your load scripts here

Next i;

View solution in original post

2 Replies
Or
MVP
MVP

Load * Inline [
Connection
Connection1

Connection2

];

For each i in FieldValueList('Connection')
LIB CONNECT TO '$(i)';

// Add your load scripts here

Next i;

Sivapriya_d
Creator
Creator

Just thought of trying this 

Sub Connection1
LIB CONNECT TO $(vConnection);
//Respective Query
End Sub

Sub Connection2
LIB CONNECT TO $(vConnection);
//Respective Query

End Sub

Sub Connection3
LIB CONNECT TO $(vConnection);
//Respective Query
End Sub


Set vConnectionlag=1;

Connections:
LOAD
ConnectionName
FROM [lib://Connections/Connections.xlsx]
(ooxml, embedded labels, table is Sheet1);

For each vConnection in FieldValueList('ConnectionName')

Let vConnect='Connection'&'$(vConnectionlag)';
Call $(vConnect)

vConnectionlag=$(vConnectionlag)+1;

Next vConnection