How to get OData Connection Information
Contents
[
Hide
]
Get OData Connection Information
There might be cases where developers need to extract OData information from the excel file. Aspose.Cells for Python via .NET provides the Workbook.data_mashup property which returns the DataMashup information present in the Excel file. This information is represented by the DataMashup class. The DataMashup class provides the power_query_formulas property that returns the PowerQueryFormulaCollction collection. From the PowerQueryFormulaCollction, you can get access to PowerQueryFormula and PowerQueryFormulaItem.
The following code snippet demonstrates the use of these classes to retrieve the OData information.
The Source file used in the following code snippet is attached for your reference.
Sample Code
Console Output
Connection Name: Orders
Name: Source
Value: OData.Feed("https://services.odata.org/V3/Northwind/Northwind.svc/", null, [Implementation="2.0"])
Name: Orders_table
Value: Source{[Name="Orders",Signature="table"]}[Data]