ピボットテーブルの外部接続データソースの取得
Contents
[
Hide
]
Pivot Table の外部接続データソースの取得方法
Aspose.Cells for Node.js via C++はピボットテーブルの外部接続データソースを取得する機能を提供します。これには、getExternalConnectionDataSourceメソッドを PivotTable クラスの中で提供しています。この getExternalConnectionDataSourceメソッドは ExternalConnection オブジェクトを返します。次のコードスニペットは、ピボットテーブルの外部接続データソースを取得するための getExternalConnectionDataSource メソッドの使用例です。
サンプルコード
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AsposeCells = require("aspose.cells.node"); | |
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Source directory | |
var sourceDir = RunExamples.Get_SourceDirectory(); | |
// Load sample file | |
var workbook = new AsposeCells.Workbook(sourceDir + "SamplePivotTableExternalConnection.xlsx"); | |
var worksheet = workbook.getWorksheets().get(0); | |
// Get the pivot table | |
var pivotTable = worksheet.getPivotTables().get(0); | |
// Print External Connection Details | |
console.log("External Connection Data Source"); | |
console.log("Name: " + pivotTable.getExternalConnectionDataSource().getName()); | |
console.log("Type: " + pivotTable.getExternalConnectionDataSource().getType()); |
コードスニペットで使用されるソースファイルは、参照用に添付されています。