在Applescript中编写脚本-整数与指数表示



我有代码,检索单元格在一个excel文件,看起来像这样:

tell application "Microsoft Excel"  
-- put the complete set of data into a list of lists (i.e., 2 dimensions -> columns of rows)
set range1 to range "B2:H7686"
tell active sheet to set myData to value of range1
-- now access a specific cell's data
set myRow to 7
set myCol to 3
set myVal to item {myCol} of item {myRow} of myData as string
end tell

但是当我得到列表的结果列表时,大于10000.0的数字以指数形式表示。

我怎样才能得到这个脚本检索的数字在常规整数形式或改变列表中的数字整数形式后,我已经运行这个脚本?

旁注:这些列表包含数字和字符串

AppleScript Editor总是在指数记数法中显示小数点前>8位的整数和>4位的浮点数。

下面是从前面的Excel电子表格中获取值的一种方法:

tell application "Microsoft Excel"
    tell active sheet
        set x to column 1's row 1's value
    end tell
end tell

这里有一种方法来确定值是否是字符串:

set isString to ( x's class is equal to text )

尝试:

tell application "Microsoft Excel" to set myData to formula of cells of (range "B2:H7686")

最新更新