Aspose::Cells::QueryTable class
Contents
[
Hide
]QueryTable class
Represents QueryTable information.
class QueryTable
Methods
| Method | Description |
|---|---|
| GetAdjustColumnWidth() | Returns or sets the AdjustColumnWidth of the object. |
| GetConnectionId() | Gets the connection id of the query table. |
| GetExternalConnection() | Gets the relate external connection. |
| GetName() | Gets the name of querytable. |
| GetPreserveFormatting() | Returns or sets the PreserveFormatting of the object. |
| GetResultRange() | Gets the range of the result. |
| IsNull() const | Checks whether the implementation object is nullptr. |
| explicit operator bool() const | operator bool() |
| operator=(const QueryTable& src) | operator= |
| QueryTable(QueryTable_Impl* impl) | Constructs from an implementation object. |
| QueryTable(const QueryTable& src) | Copy constructor. |
| SetAdjustColumnWidth(bool value) | Returns or sets the AdjustColumnWidth of the object. |
| SetPreserveFormatting(bool value) | Returns or sets the PreserveFormatting of the object. |
| ~QueryTable() | Destructor. |
Fields
| Field | Description |
|---|---|
| _impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook(u"example.xlsx");
//Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.GetWorksheets().Get(0);
//Getting the first query table in the worksheet if exists
QueryTableCollection qts = worksheet.GetQueryTables();
if(!qts.IsNull() && qts.GetCount() != 0)
{
QueryTable qt = worksheet.GetQueryTables().Get(0);
//Getting display address of the query table.
U16String address = qt.GetResultRange().GetAddress();
}
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++