In WorksheetPageSetup, you can only get the PageSize, but not set it. The only way is through setting a PaperType.
This is because in Telerik.Windows.Documents.Spreadsheet.Model.Printing.SheetPageSetupBase, the only way to set the pageSize property is by setting a PaperType, then it uses PaperTypeConverter.ToSize(PaperType) to convert it to the pageSize. I cannot see any other way to set this to a custom size set by the user.
Please allow custom page sizing by adding a setter for the PageSize if possible. Thank you!
WorksheetPageSetup pageSetup = worksheet.WorksheetPageSetup;
Size pageSize = new Size(50, 80)
pageSetup.PageSize = pageSize; // produces cs0200
pageSetup.PageSize.Width = pageSize.Width; // produces cs1612
pageSetup.PageSize.Height = pageSize.Height; // produces cs1612
Use the code to import a sample txt file containing a "+" sign in a cell value:
Workbook workbook;
Telerik.Windows.Documents.Spreadsheet.FormatProviders.IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.TextBased.Txt.TxtFormatProvider();
using (Stream input = new FileStream(@"sample.txt", FileMode.Open))
{
workbook = formatProvider.Import(input);
}
Expected behavior: the file is imported successfully
Actual behavior: an error is thrown
ArgumentException at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.Theme.SystemColorElement.GetColor(IOpenXmlImportContext context)
The problematic value is val="windowText"
Exception "Format string is not in the correct format" is thrown when importing a file with the following format string: "US$"#,##0.0"m";($#,##0.0)
The exception is thrown in the ValidateDateTimeFormatDescriptor method.
Implement a GoalSeek functionality.
Sometimes leading minus sign in a cell with text is treated as a formula.
A possible workaround is to remove the minus sign or to replace it with some other symbol.
When there are unclosed quotes (") several cells/rows are imported as one.
A possible workaround is to replace all the quote (") symbols with single quote (') symbols.