Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
This release of Aspose.Cells for .NET API has exposed the ImportTableOptions.IsHtmlString property, which directs the API to parse HTML tags while importing data onto the worksheet and sets the parsed result as the cell value. Please note that Aspose.Cells APIs already provide the Cell.HtmlString to perform this task for a single cell; however, while importing data in bulk, such as from a DataTable, the ImportTableOptions.IsHtmlString property (when set to true) parses all supported HTML tags and sets the parsed results to the corresponding cells.
Here is the simplest usage scenario.
C#
//create an instance of ImportTableOptions
var importOptions = new ImportTableOptions();
//Set IsHtmlString to true so that the API can parse the HTML
importOptions.IsHtmlString = true;
//Import data from DataTable while passing instance of ImportTableOptions
cells.ImportData(table, 0, 0, importOptions);
Aspose.Cells for .NET 8.6.3 has exposed the Workbook.CreateBuiltinStyle method that can be used to create an object of the Style class that corresponds to one of the built‑in styles offered by the Excel application. The Workbook.CreateBuiltinStyle method accepts a constant from the enumeration BuiltinStyleType. Please note that with previous releases of the Aspose.Cells APIs, the same task could be accomplished via the StyleCollection.CreateBuiltinStyle method, but as recent releases of Aspose.Cells APIs have removed the StyleCollection class, the newly exposed Workbook.CreateBuiltinStyle method can be considered an alternative approach to achieve the same.
Following is the simple usage scenario.
C#
//Create an instance of Workbook
//Optionally load a spreadsheet
var book = new Workbook();
//Create a built‑in style of type Title
var style = book.CreateBuiltinStyle(BuiltinStyleType.Title);
Aspose.Cells for .NET 8.6.3 has exposed an overloaded version of Cells.ImportGridView that can now accept an instance of ImportTableOptions to give more control over the import process.
Following is the simple usage scenario.
C#
//Create an instance of Workbook
//Optionally load a spreadsheet
var book = new Workbook();
//Retrieve the Cells collection of first Worksheet in Workbook
var cells = book.Worksheets[0].Cells;
//create an instance of ImportTableOptions & set its various properties
var importOptions = new ImportTableOptions();
importOptions.IsHtmlString = true;
importOptions.IsFieldNameShown = true;
//Import data from GridView while passing instance of ImportTableOptions
cells.ImportGridView(gridView, 0, 0, importOptions);
In reference to the above‑mentioned enhancements, the latest version of Aspose.Cells for .NET API has also exposed the ImportTableOptions.ConvertGridStyle property. This Boolean‑type property allows developers to control the appearance of the imported data, where setting the property to true indicates that the API will apply the style of the GridView to the cells where data has been imported.
Following is the simple usage scenario.
C#
//Create an instance of Workbook
//Optionally load a spreadsheet
var book = new Workbook();
//Retrieve the Cells collection of first Worksheet in Workbook
var cells = book.Worksheets[0].Cells;
//create an instance of ImportTableOptions
var importOptions = new ImportTableOptions();
//Set ConvertGridStyle property to true
importOptions.ConvertGridStyle = true;
//Import data from GridView while passing instance of ImportTableOptions
cells.ImportGridView(gridView, 0, 0, importOptions);
Aspose.Cells for .NET 8.6.3 has exposed the LoadDataOption.OnlyVisibleWorksheet property, which, when set to true, influences the loading mechanism of the Aspose.Cells for .NET API; as a result, only visible worksheets from a given spreadsheet will be loaded. Please check the detailed article on this subject.
Following is the simple usage scenario.
C#
//Create an instance of LoadDataOption
var loadDataOptions = new LoadDataOption();
//Set OnlyVisibleWorksheet property to true
loadDataOptions.OnlyVisibleWorksheet = true;
//Create an instance of LoadOptions
var loadOptions = new LoadOptions();
//Set LoadDataOptions property to the instance of LoadDataOption created earlier
loadOptions.LoadDataOptions = loadDataOptions;
//Create an instance of Workbook & load an existing spreadsheet
//while passing the instance of LoadOptions created earlier
var book = new Workbook(inputFilePath, loadOptions);
As an alternative to the Worksheet.CopyConditionalFormatting method, it is advised to use any of the Cells.CopyRows or Range.Copy methods.
Please use the Cells.LastCell property as an alternative to the Cells.End property.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.