Unplanned
Last Updated: 31 Oct 2018 08:14 by ADMIN
ADMIN
Boby
Created on: 14 Dec 2016 13:30
Category: Spreadsheet
Type: Bug Report
2
Spreadsheet: Pasting plain text is not affected by current number format
If plain text is pasted in a cell, and the text is automatically recognizable as date, number, percentage, formula or other format, the text is always converted to the recognized number format.

Instead, the cell's current number format should affect the convertion in the following way:
- If the current format is General -> parse the value with the automatically recognized format, and set the value with the automatically recognized format
- If the current format is Text -> set the value as text, and preserve the current format (Text)
- If the current format is any other format -> try parse the value with the current format
  - Successful -> set the parsed value with the current format
  - Unsuccessful -> parse the value with the automatically recognized format, and set the parsed value with the current format.

As a result, strings which are recognizable as dates, for example, are pasted as their numeric representation instead of with their Date formatting. Also it's not possible to paste something as plain text. 

Workaround: for always pasting plain text: Create custom Paste button and executes the following code:
this.radSpreadsheet.ActiveWorksheetEditor.Selection.Cells.SetValueAsText(Clipboard.GetText());
0 comments