WebQueryタイプの外部データ接続の操作

WebQuery タイプの外部データ接続の操作

次のコードは、WebQueryタイプの外部データ接続の操作方法を示しています。提供されたリンクからダウンロードできるサンプルExcelファイルを使用しています。また、このコードのコンソール出力も以下で確認できます。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(WorkingWithExternalDataConnection.class);
Workbook workbook = new Workbook(dataDir + "WebQuerySample.xlsx");
ExternalConnection connection = workbook.getDataConnections().get(0);
if (connection instanceof WebQueryConnection)
{
WebQueryConnection webQuery = (WebQueryConnection)connection;
System.out.println("Web Query URL: " + webQuery.getUrl());
}

コンソール出力

上記コードのコンソール出力は、このサンプルExcelファイルになります。

 Web Query URL: http://www.aspose.com/docs/display/cellsnet/Home