Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Workbook.DataConnections collection. One type of such a data connection is WebQuery. This article will show you how to work with a WebQuery data connection. You can create a WebQuery data connection in Microsoft Excel using the Data > From Web menu.
The following code shows how to work with an external data connection of type WebQuery. It uses the sample Excel file that you can download from the provided link. You can also see the console output of this code below.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "WebQuerySample.xlsx");
// Loads the workbook which contains hidden external links
const workbook = new AsposeCells.Workbook(filePath);
const connections = workbook.getDataConnections();
if (connections.getCount() > 0) {
const connection = connections.get(0);
if (connection instanceof AsposeCells.WebQueryConnection) {
const webQuery = connection;
console.log("Web Query URL: " + webQuery.getUrl());
}
}
Here is the console output of the above code using this sample Excel file.
Web Query URL: https://docs.aspose.com/cells/nodejs-cpp/
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.