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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
rednas
Contributor
Contributor

How can I export objects from a Qlik Sense sheet (inside an app) using PowerShell?

Hi Qlik Community,

I'm working on automating an export process in Qlik Sense Enterprise using PowerShell, and I could use some help.

I'd like to:

  1. Loop through multiple apps and their sheets and object id's (like straight tables or pivot tables)

  2. Export these tables as CSV or XLSX files

  3. Save them automatically to a SharePoint folder

Setup:

  • Using PowerShell

  • Authenticating with a server certificate (.pfx)

  • Trying to connect to the Qlik Engine via WebSocket (wss://<server>:4747)

Issues:

  1. Authentication & WebSocket:
    I'm unable to get the WebSocket connection to reach the Open state. It stays in Connecting and then goes to Closed.
    ➤ Does anyone have a working PowerShell example for setting up a WebSocket connection using a .pfx certificate?

  2. Export to SharePoint:
    What’s the best way to automate export to a SharePoint location?

 

What would be the best approach?

Labels (2)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

I'm not very skilled at using PowerShell, but you can interact with the engine using the .NET SDK which you can use from PowerShell. There are examples available here illustrating how to use that SDK to both traverse apps (example titled "AppTraverser") and to export Excel files (example titled "DownloadDataToExcel"):

https://github.com/AptkQlik/PublicExamples/

There is also a small utility available that scans all objects used by all apps in an installation available that might be of interest to you. You can find the code for it here:

https://github.com/kolsrud/qlik-object-usage-analyzer/tree/main/QlikObjectUsageAnalyzer

In particular you might want to have a look at the "ScanAllApps" method found here:

https://github.com/kolsrud/qlik-object-usage-analyzer/blob/main/QlikObjectUsageAnalyzer/Program.cs#L...

View solution in original post

1 Reply
Øystein_Kolsrud
Employee
Employee

I'm not very skilled at using PowerShell, but you can interact with the engine using the .NET SDK which you can use from PowerShell. There are examples available here illustrating how to use that SDK to both traverse apps (example titled "AppTraverser") and to export Excel files (example titled "DownloadDataToExcel"):

https://github.com/AptkQlik/PublicExamples/

There is also a small utility available that scans all objects used by all apps in an installation available that might be of interest to you. You can find the code for it here:

https://github.com/kolsrud/qlik-object-usage-analyzer/tree/main/QlikObjectUsageAnalyzer

In particular you might want to have a look at the "ScanAllApps" method found here:

https://github.com/kolsrud/qlik-object-usage-analyzer/blob/main/QlikObjectUsageAnalyzer/Program.cs#L...