Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Workbook object now implements the System.IDisposable interface, which has a single Dispose method. You can either directly call the Workbook.Dispose method or create a Workbook object in a using statement to call this method automatically.
C#
//Create workbook object
Workbook book = new Workbook();
//Call Dispose method
book.Dispose();
//Call Dispose method via using statement
using (Workbook book = new Workbook())
{
//do processing
}
Aspose.Cells for .NET 8.5.1 has exposed the Cell.GetHeightOfValue method to get the height of a cell’s value. By using this method you can calculate the height of the cell value and then set the height of the row of that cell accordingly. Check the detailed article on how to calculate the cell height & width.
Aspose.Cells for .NET 8.5.1 has exposed the enumeration Aspose.Cells.Tables.TableDataSourceType to retrieve the data source type of a ListObject. The TableDataSourceType enumeration has the following fields:
With the release of v8.5.1, the Aspose.Cells API has exposed the read‑only ListObject.DataSourceType property that can be used to detect the data source type of a ListObject.
Here is the simplest usage scenario.
C#
Workbook book = new Workbook("D:/book1.xlsx");
Worksheet sheet = book.Worksheets[0];
ListObject listObject = sheet.ListObjects[0];
if (listObject.DataSourceType == Aspose.Cells.Tables.TableDataSourceType.QueryTable)
{
Console.WriteLine("Data Source Type is Query Table");
}
else if (listObject.DataSourceType == Aspose.Cells.Tables.TableDataSourceType.SharePoint)
{
Console.WriteLine("Data Source Type is SharePoint Linked List");
}
else if (listObject.DataSourceType == Aspose.Cells.Tables.TableDataSourceType.Worksheet)
{
Console.WriteLine("Data Source Type is Excel Worksheet Table");
}
else if (listObject.DataSourceType == Aspose.Cells.Tables.TableDataSourceType.XML)
{
Console.WriteLine("Data Source Type is XML");
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.