ブックでのカスタム番号の小数点とグループの区切り記号を指定する

Microsoft Excelを使用してカスタムセパレータを指定する

次のスクリーンショットは、詳細設定 タブを示し、カスタムセパレータ を指定するセクションを強調しています。

todo:image_alt_text

Aspose.Cells for Python via .NETを使用したカスタムセパレーターの指定

以下のサンプルコードは、Aspose.Cells for Python via .NET APIを使ったカスタムセパレーターの指定方法を示しています。これは、カスタムの数値小数点とグループセパレーターをそれぞれドットとスペースに設定しています。

C#コードでカスタム数値の10進セパレータとグループセパレータを指定

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
workbook = Workbook()
# Specify custom separators
workbook.settings.number_decimal_separator = '.'
workbook.settings.number_group_separator = ' '
worksheet = workbook.worksheets[0]
# Set cell value
cell = worksheet.cells.get("A1")
cell.put_value(123456.789)
# Set custom cell style
style = cell.get_style()
style.custom = "#,##0.000;[Red]#,##0.000"
cell.set_style(style)
worksheet.auto_fit_columns()
# Save workbook as pdf
workbook.save(dataDir + "CustomSeparator_out.pdf")