Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
master_t
Partner - Creator II
Partner - Creator II

.NET SDK: downloading exported data

Hello

I'm using the .NET SDK to connect to QlikSense server using certificate authentication, like this:

//Connect to QlikSense server 

senseServerLocation.AsDirectConnection( 

    "myuserdir", //User directory 

    "administrator", //UserID (this user is RootAdmin) 

    false, 

    false, 

    x509collection //Certificate 

);

all goes correctly, and I can manipulate apps and objects. However, later, I'm trying to export data from an object, like this:

var exportResult = table.ExportData(NxExportFileType.EXPORT_OOXML, @"/qHyperCubeDef", "out.xlsx", NxExportState.EXPORT_ALL);

var downloadUrl = "https://mysenseserver/" + exportRes.Url.ToString();

However, if I download the url using WebClient (or similar class) it just returns the QlikSense login page, since I'm not authenticated. But since I'm using certificate to authenticate, I don't have username/pass to authenticate properly. How do I download the exported file in this case??

12 Replies
YuroB
Contributor II
Contributor II

Upgrade to 1.3 and....now the file is inside my folder !!!

Great.

Now I have to work with filters ...

Thank you Yko !!!

YuroB
Contributor II
Contributor II

'still here 😞   !!!

Opening (with Ms Excel) the file generated by:

Edr = Go.ExportData(NxExportFileType.EXPORT_OOXML, "/qHyperCubeDef")
Data = Rc.GetBytes(Edr.Url)
File.WriteAllBytes("c:\temp\myfile.xls", Data)

it returns an " ...format and extension don't match ..." alert.

If I reply Yes Excel opens file with all data inside.

Is there a workaround ?

Thank you !!!

 

YuroB
Contributor II
Contributor II

Since I have Excel 2016 ....just use xlsx extension !!!
I works !!!