我如何从excel中读取千位分隔符 [英] How do I read the thousand seperators from excel
问题描述
HI,
我正在研究excel部分。我想知道是否有任何方法可以读取用户在excel中使用的千位分隔符或小数点分隔符。是否有办法这可以在不打开excel的情况下完成,例如,如果用户打开了excel并将千位分隔符格式设置为逗号,并关闭了excel。
可以我读过那种格式
我尝试过的事情:
i知道它的工作原理是给出我想知道的路径是否有路径它是否有效
I am working on the excel part.I wanted to know is there any way that we can read the thousand separator or decimal separator used by user in excel.Is there a way that this can be done without opening the excel which means for example if user have opened the excel and have set the thousand separators format to comma , and closed the excel.
Can i read that format
What I have tried:
i know that it works by giving the path i wanted to know if with out path will it works
推荐答案
Sub ShowSeparatorInfo()
Dim ap As Application
Set ap = Excel.Application
With ap
Debug.Print .DecimalSeparator
Debug.Print .ThousandsSeparator
Debug.Print .UseSystemSeparators
End With
End Sub
如果Decimal和Tho需要将UseSystemSeparators设置为FALSE usands分隔符设置为非标准的。
UseSystemSeparators needs to be set to FALSE if the Decimal and Thousands separators are set to something non-standard.
这篇关于我如何从excel中读取千位分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!