Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The HtmlSaveOptions class has exposed the ExportHiddenWorksheet property which can be used to specify if hidden worksheets are exported to HTML format. The default value is true, whereas if set to false, Aspose.Cells will not export hidden worksheet contents.
StringValueWithoutFormat property has been added to the Cell class, in order to facilitate developers retrieving the cell value without any formatting applied.
Below provided code snippet demonstrates the usage of the Cell.StringValueWithoutFormat property compared to the cell.DisplayStringValue, by creating a spreadsheet from scratch and applying the number format to one of the cells.
C#
//Create an instance of Workbook
Workbook book = new Workbook();
//Access first worksheet
Worksheet sheet = book.Worksheets[0];
//Access A1 cell
Cell cell = sheet.Cells["A1"];
//Put a value cell and convert it to number
cell.PutValue("123456", true);
//Create a new Style object and add it to Workbook's Style Collection
Style style = book.Styles[book.Styles.Add()];
//Set Number format for Style object
style.Number = 3;
//Set the style of A1 cell
cell.SetStyle(style, new StyleFlag() { NumberFormat = true });
//Get formatted string value
string formatted = cell.DisplayStringValue;
Console.WriteLine(formatted);
//Get un-formatted string value
string unformatted = cell.StringValueWithoutFormat;
Console.WriteLine(unformatted);
Output of the above code is as follows
123,456
123456
Many properties from BuiltInDocumentPropertyCollection class have been marked obsolete starting from Aspose.Cells for .NET 8.1.0. These properties include Bytes, Characters, CharactersWithSpaces, Lines & Paragraphs. The reason is that these properties are of no use in preserving Excel spreadsheets because Excel omits them. Whereas these properties were originally intended for Word documents and PowerPoint presentations.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.