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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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??

14 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 !!!

 

ar5
Partner - Contributor III
Partner - Contributor III

Any insight into how can I export current selections while exporting a dataset (like tables)? We are using capability API. But was wondering if I can accomplish the goal with other APIs if not possible with capability. Thank you.

app.visualization.get(attrs.id).then(function (vis) {
                  vis.exportData().then(function (link) {
                    console.log("Excel Download link", link);
                    window.open(link);
                    var title = modal.layout.qMeta.title;
                    $("#download_file").attr("href", link);
                    $("#download_file").show();
                  });
                });
 
The output should be like:

Field : Dim1 Selected values: a, c
{dataset}
Øystein_Kolsrud
Employee
Employee

I think you will have a better chance of getting a good answer to this question if you post it in a new thread.