首页 > 解决方案 > Applescript Excell将列保存在数组中,但将行保存为字符串

问题描述

我正在尝试将列的所有值保存在数组中。该代码似乎有效,因为当我记录数组时,我得到了不同的值。

当我连续做同样的事情时,数组将所有值存储在一个字符串中

tell application "Microsoft Excel"
    open file "file.xlsx"
    set colValue to (value of range "A14:A100")
    repeat with myDate in colValue

    --this works    
    log myDate
    end repeat
    set rowValue to (value of range "C14:X14")
    repeat with myTime in rowValue

    --stores values in a single string
    log myTime
    end repeat
end tell

我的问题是,如何像处理列一样将所有行字段存储在数组中?

标签: arraysexcelapplescript

解决方案


推荐阅读