Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

I am developing a .net Windows Desktop Application which would connect to Qlik Sense and access the apps and sheets available with in the hub. I was able to connect to Qlik Sense Desktop with QlikSense .Net SDK . My requirement is to export the apps/sheets as pdf/csv. i have tried ISheet.ExportData(NxExportFileType.EXPORT_CSV_C, "/qHyperCubeDef", sheet.MetaAttributes.Title + "_Download") but it returned invalid Parameters error.

Also the API Documentation reads that the .Net SDK has limited functionality.

can i achieve this functionality with the help of .Net SDK ? or Do i need to try some other API.

Tags (2)
6 Replies
kranti_deshpand
New Contributor II

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hi,

I am not sure about the .Net SDK. But see below equivalent code that needs to write in your custom application JavaScript. This will enable default export options in QlikSense.

"support:{snapshot: true, export: true, exportData: true},"

Regards,

Kranti

Not applicable

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hi Kranthi,

Thanks for your reply. I have been trying with .Net SDK i havent been successful to achieve export operation.
I wanted to explore using Rest API in my C# code, If you have any knowledge on this api then can you pls throw some light on the following

- How can i establish/ login to QlikSense with rest service, what should my user id be ? do we need a certificate with the webrequest.

- How to create session cookie

- Virtual proxy, I have installed QlikSense Desktop app do i have to install QMC to create the proxies. I think qmc is not available for trial.

Basically from my .Net class i have to make rest calls login to Qlik Sense=> create a session cookie, using the cookie i have to send webrequest to Get Apps and Sheets.

i think i have asked for a lot of information but,Pls help me with what ever information you can

Thanks

tomovangel
Contributor III

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hello, Vijrumbhan 

I am currently working on something similar,
Did you make it work in your case?

benbassou
New Contributor III

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hello,


Actually, you can use PhantomJS or SlimerJS for C# .NET to retrieve screenshots of your visualizations in Qlik sense and then create your own NPrinting.


benbassou
New Contributor III

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hi,

There are a several ways to establish a connection with Qlik sense like the static header,  tickets, direct NTLM etc.... and also with cookies as you said.

I invite you to check this => github.com/AptkQlik/PublicExamples

Btw, there is no QMC for Qlik sense desktop, you can establish a connection directly using 4848 port.

prasannappt
New Contributor II

Re: Unable to Export Sheets to PDF when QlikSense is connected from c#.net class using .Net SDK

Hi Vijrumbhan ,

    Am also facing the same problem, here am trying like

My code :

qsApp.GetSheet("GnAzpy").ExportData(NxExportFileType.EXPORT_CSV_C, @"C:\Users\GIS\Documents\visual studio 2017\Projects\Qlik Engine\Qlik Engine", "Download");

am getting error like " invalid parameters 8 invalid parameters() " , how can i fix this one and could you please share the code

thanks