Add support for Comments.
Sheets can have Visible, Hidden and Very Hidden visibility. Add support for setting this property.
SpreadProcessing has a method, cellValue.GetValueAsString(format), which allows the user to apply excel format on a value and get the result. While in SpreadStreamProcessing one could get the format and the value, there is no way to get their result and this is very inconvenient when the values in question are dates.
Workaround:
foreach (ICellImporter cell in rowImporter.Cells)
{
string value = cell.Value;
var format = cell.Format.NumberFormat;
var cellValueFormat = new CellValueFormat(format);
ICellValue cellValue;
CellValueFormat valueFormat;
CellValueFactory.Create(
value,
worksheet,
new CellIndex(0, 0),
cellValueFormat,
out cellValue,
out valueFormat);
var formattedValue = cellValue.GetResultValueAsString(cellValueFormat);
}
When a cell value contains commas or new lines, they are not escaped on export to CSV and single value is exported as multiple values. Workaround: Escape the value manually. For example, use the following extension method to set string cell values: internal static class CellExporterExtensions { public static void SetValue(this ICellExporter cell, string value, SpreadDocumentFormat format) { if (format == SpreadDocumentFormat.Csv) { if (value.Contains(",")) { // escape all quotes with double quotes value = value.Replace("\"", "\"\""); } // enclose all values within quotes value = string.Format("\"{0}\"", value); } cell.SetValue(value); } } Available in LIB version: 2017.1.403
The UTF8 with BOM encoding should be used to properly preserve the different characters. Available in R3 2017 Official Release.
Provide a way to measure text on different platforms so the user can pass the cell value and SpreadCellFormat and get the size of the text in pixels. This way we will be able to implement auto-fit to width functionality (AutoFitWidth), at least for the .NET Framework implementation. It will be able to measure the width of all cells in a column and set the value as column width in pixels.
At the moment only the XLSX and CSV formats are supported. It would be a good idea to add the TXT format as well.