从数字键盘更改小数分隔符
Contents
[
Hide
]
可能的使用场景
默认情况下,根据计算机上的区域设置,Aspose.Cells.GridWeb 会相应地显示数字数据。您可以使用 Aspose.Cells.GridWeb API 从数字键盘通过编程方式更改小数分隔符。因此,当将文件导入 GridWeb 矩阵或在新的工作表单元格中输入一些数字数据(从数字键盘),它应该在视觉上显示您所需的小数分隔符。
从数字键盘更改小数分隔符
使用 GridWorksheetCollection.NumberDecimalSeparator 属性,您可以通过编程方式从数字键盘更改小数分隔符。请查看显示其工作方式的截图
示例代码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Change the numeric decimal separator to "^" char. | |
GridWeb1.WorkSheets.NumberDecimalSeparator = '^'; |
请注意,小数分隔符更改仅用于用户在 GridWeb 中的视觉体验。当您编辑和保存工作簿时,它仍会根据您的区域设置小数分隔符将数字值(在电子表格中)存储。