数字转到下一个空单元格?

时间:2015-07-30 18:07:50

标签: numbers applescript applescript-numbers

For some reason this script doesn't go to the next empty cell in column?  

我做错了什么? 我希望能够将今天的日期添加到列中的下一个空单元格中 如果这些数字不会改变而是留在那个日期会很棒

需要一些帮助 提前谢谢。



on run {input, parameters}
	
	tell application "Numbers"
		activate
		tell the first table of the active sheet of document 1
			tell column "F"
				set r to (address of row of last cell whose value is greater than "")
				set r to r + 1
				set value of cell r to date string of (current date)
			end tell
		end tell
	end tell
	
	
	return input
end run




1 个答案:

答案 0 :(得分:0)

以下是我用来查找列中下一个空单元格的代码:

tell application "Numbers"
    tell front document
        tell table 1 of sheet 1
            set fullSheet to 1
            repeat
                set cellValue to value of cell ("A" & fullSheet) --of table 1 of sheet 1
                if cellValue = missing value then exit repeat
                set fullSheet to fullSheet + 1
            end repeat
        end tell
    end tell
end tell

我知道它不是很吸引人,但自2014年2月以来,它一直在完成所有数字升级。