主题
International (方法)
返回当前的国家/地区和国际设置信息。只读 Any 类型。
说明
括号和大括号
索引 | 类型 | 含义 |
---|---|---|
xlLeftBrace | str | 在字面数组中左大括号 ({) 的替代字符。 |
xlLeftBracket | str | 在 R1C1-样式相对引用中左方括号 ([) 的替代字符。 |
xlLowerCaseColumnLetter | str | 小写列字母。 |
xlLowerCaseRowLetter | str | 小写行字母。 |
xlRightBrace | str | 在字面数组中右大括号 (}) 的替代字符。 |
xlRightBracket | str | 在 R1C1-样式引用中右方括号 (]) 的替代字符。 |
xlUpperCaseColumnLetter | str | 大写列字母。 |
xlUpperCaseRowLetter | str | 大写行字母(对于 R1C1-样式引用)。 |
国家/地区设置
索引 | 类型 | 含义 |
---|---|---|
xlCountryCode | int | ET 的国家/地区版本。 |
xlCountrySetting | int | Windows“控制面板”中的当前国家/地区设置。 |
xlGeneralFormatName | str | “常规”数字格式名称。 |
货币
索引 | 类型 | 含义 |
---|---|---|
xlCurrencyBefore | bool | 如果货币符号在货币值之前,则返回 True;如果货币符号在货币值之后,则返回 False。 |
xlCurrencyCode | str | 货币符号。 |
xlCurrencyDigits | int | 货币格式中的小数位数。 |
xlCurrencyLeadingZeros | bool | 如果显示零货币值的前导零,则返回 True。 |
xlCurrencyMinusSign | bool | 如果对负数使用负号,则返回 True;如果使用括号,则返回 False。 |
xlCurrencyNegative | int | 负数货币值的货币格式: 0 = (symbolx) 或 (xsymbol) 1 = -symbolx 或 -xsymbol 2 = symbol-x 或 x-symbol 3 = symbolx- 或 xsymbol- 其中 symbol 为国家/地区的货币符号。请注意货币符号的位置由 xlCurrencyBefore 决定。 |
xlCurrencySpaceBefore | bool | 如果在货币符号前面添加空格,则返回 True。 |
xlCurrencyTrailingZeros | bool | 如果显示零货币值的尾部零,则返回 True。 |
xlNoncurrencyDigits | int | 非货币格式中所使用的十进制数字的个数。 |
日期和时间
索引 | 类型 | 含义 |
---|---|---|
xl24HourClock | bool | 如果使用 24 小时制时间,则返回 True;如果使用 12 小时制时间,则返回 False。 |
xl4DigitYears | bool | 如果使用四位年,则返回 True;如果使用两位年,则返回 False。 |
xlDateOrder | int | 日期元素的次序: 0 = 月-日-年 1 = 日-月-年 2 = 年-月-日 |
xlDateSeparator | str | 日期分隔符 (/)。 |
xlDayCode | str | 日符号 (d)。 |
xlDayLeadingZero | bool | 如果在日期中显示前导零,则返回 True。 |
xlHourCode | str | 小时符号 (h)。 |
xlMDY | bool | 如果长日期显示中日期次序为月-日-年,则返回 True;如果次序为日-月-年,则返回 False。 |
xlMinuteCode | str | 分钟符号 (m)。 |
xlMonthCode | str | 月符号 (m)。 |
xlMonthLeadingZero | bool | 如果以数字显示月份时显示月份中的前导零,则返回 True。 |
xlMonthNameChars | int | 为了向后兼容总是返回三个字符。月份名称的缩写从 Windows 中读取并且可以为任意长度。 |
xlSecondCode | str | 秒符号 (s)。 |
xlTimeSeparator | str | 时间分隔符 (😃。 |
xlTimeLeadingZero | bool | 如果在时间表示中显示前导零,则该值为 True。 |
xlWeekdayNameChars | int | 为了向后兼容总是返回三个字符。星期名称的缩写从 Windows 中读取并且可以为任意长度。 |
xlYearCode | str | 数字格式中的年符号 (y)。 |
度量系统
索引 | 类型 | 含义 |
---|---|---|
xlMetric | bool | 如果使用米制度量系统,则返回 True;如果使用英制度量系统,则返回 False。 |
xlNonEnglishFunctions | bool | 如果不以英文显示函数,则返回 True。 |
分隔符
索引 | 类型 | 含义 |
---|---|---|
xlAlternateArraySeparator | str | 如果当前数组分隔符与小数分隔符相同时替代的数组项分隔符。 |
xlColumnSeparator | str | 数组文字类型的列分隔符。 |
xlDecimalSeparator | str | 小数分隔符。 |
xlListSeparator | str | 列表分隔符。 |
xlRowSeparator | str | 数组文字类型的行分隔符。 |
xlThousandsSeparator | str | 零或千位分隔符。 |
上表显示的符号、分隔符和货币格式可能因所用语言和地理位置而异,而且可能不可用,这取决于选择或安装的语言支持(例如,美国英语)。
参数
属性 | 数据类型 | 必填 | 说明 |
---|---|---|---|
Index | Any | 可选 | 要返回的设置。可以是表中列出的 XlApplicationInternational 常量之一。 |
示例
python
#本示例显示区域设置中的十进制分隔符
def test():
print("The decimal separator is ", Application.International(xlDecimalSeparator))
python
#本示例显示区域设置中是否使用的是四位数年份
def test():
print(Application.International(xl4DigitYears))