Connection String on ExternalDataConnection for WebQuery

How can I get the connection string for a web query in Aspose? I can see the data connection, I can tell that it is a WebQuery, but I cannot get any information about the URL to which the data connection connects.

Hi,

Thanks for your posting and using Aspose.Cells.

Please provide us your sample excel file containing your web query and a screenshot highlighting your issue in a red circle for our reference. We will look into it and provide you a sample code. In case, this is a new feature, we will add a request for it in our database to support it in our future versions. Thanks for your cooperation.

I need the connection string (boxed in red on the screenshot). The screenshot is taken from the XLSX file included in this post.

Hi Shawn,


Thank you for sharing the sample spreadsheet and screenshot.

We have logged a feature request in our database for the product team’s review. The ticket Id for your reference is CELLSNET-43885. Please spare us little time to properly analyze the requirement and get back to you with updates in this regard.

Hi,

Please try our latest version/fix: Aspose.Cells for .NET v8.6.0.2 (attached).

Please refer to the following sample code for your reference:
e.g.
Sample code:

Workbook wb = new Workbook( “WebQuerySample.xlsx”);
ExternalConnectionCollection connections = wb.DataConnections;
int connectionCount = connections.Count;
ExternalConnection connection = null;
for (int i = 0; i < connectionCount; i++)
{

connection = connections[i];
//Check if the Connection is WebQueryConnection, then retrieve its various properties
if (connection is WebQueryConnection)
{

WebQueryConnection webQuery = (WebQueryConnection)connection;
Console.WriteLine(webQuery.Url);

}

}

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-43885) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.