Tag: 苹果

如何使用AppleScript在excel中将单元格值增加1?

这应该是简单的,但我可能没有正确的方式接近它。 我只是想将单元格“C7”的值从4增加到5.这就是我想象的工作方式。 任何build议不胜感激。 tell application "Microsoft Excel" get value of cell "C7" set value of cell "C7" to current value +1 end tell

在AppleScript中获取月份的最后一天以及当月的假期

我正在写一个AppleScript,它每个月都会生成一个MS Excel电子表格。 我需要知道当月有多less天,然后每个月都要低谷,决定某一天是平日还是假期。 我想我会节省假期(从这个网站http://kalendar365.cz/statni-svatky/2016作为表,并在本地访问)为此。 我的问题是: 我如何获得一个月的最后一天? 如何有效循环当月的所有date,并决定是星期日,星期六还是指定其他地方的date(例如,在xlsx电子表格的文本文件中)?

将图表另存为.jpeg文件

多年来我一直在使用Excel图表来制作用于教授物理的电脑animation电影。 但是,在从VBA转换到AppleScript时,我很难将图表保存为.jpeg文件。 我已经尝试过下面的脚本: tell application "Microsoft Excel" set filebasename to get value of cell "MovieName" activate object chart object filebasename of sheet 1 set testfile to "test.jpg" save as picture active chart picture type save as JPG file file name testfile end tell 但AppleScript编辑器告诉我活动图表不理解保存为图片的指令。 我的解决方法是使用脚本: tell application "Microsoft Excel" set filebasename to get value of […]

如何使用苹果脚本在excel中设置常量序列值

如何使用苹果脚本在excel中设置常量序列值。 tell worksheet 1 of active workbook set obj to make new chart object at end with properties{ left position:120,top:50,width: 120,height:150} set ochart to chart of obj tell ochart make new series at end with properties {series values:"={1}"} end tell end tell This script through error(Microsoft Excel got an error:Can't make class series) Please replay

轴标题设置

如何在Excel 2008中使用AppleScript将垂直轴标题应用为旋转标题,水平标题,垂直标题。 tell application "Microsoft Excel" tell worksheet 1 of active workbook set ochart to chart of chart object "chartname" tell ochart set cattitle to gat axis of ochart axis type category axis which axis primary axis tell cattitle set has title to 1 —– how to apply a title position (Horizontal,Rotated,Vertical title) end tell […]

如何使用苹果脚本创buildMicrosoft Excel文件

如何使用苹果脚本创build与名称的Excel文件? 在这个脚本中,创build了excel文件,但是没有设置工作簿名称。 tell application "Microsoft Excel" make new workbook at end with properties{name:"MyIndia"} end tell

Applescript – 设置Excel公式时转义引号

我已经广泛地搜寻了我的问题的答案,而我陷入了僵局。 我试图通过一个公式擅长与applescript。 问题是我想在字段之间放置空格的引号。 我用“\”来转义引号,但会引发错误。 为了使它更复杂,行号是一个variables“我”。 这里是excel格式的公式: =CONCATENATE(A2," ",B2," ",C2," ",D2) 这里是applescript-ese中的公式(作品,但不会在数据中产生空格): set rowCount to (((count of rows of used range of active sheet)) + 1) repeat with i from rowCount to 2 by -1 set formula of row i of column 15 to "=CONCATENATE(A" & i & "," & ",B" & i & "," & […]

使用Apple脚本在A列的Excel电子表格中查找产品代码,并通过C行中的剪贴板查看值?

非常感谢您的帮助。 我有一个电子表格,列中列出产品的行和详细信息。 我想获得excel来find列A中的产品代码,然后将已经在剪贴板中的相应值粘贴到列C中。我正在使用以下脚本: tell application "Microsoft Excel" set searchRange to range ("A1:A5") set foundRange to find searchRange what "AM100" with match case set fRow to first row index of foundRange set myData to value of range ("B" & fRow as text) set theClip to the clipboard as text end tell 我似乎无法使粘贴发生在产品代码已find的同一行的列C中。 请帮忙… 非常感谢Darryl

Applescript控制优胜美石打破Excel的?

我有一个控制Microsoft Excel的applescript。 我需要与系统事件通话以点击一些对话框button。 现在,升级(原文如此)到优胜美地后,脚本在两个错误(!!)之间交替: “系统事件发生错误:连接无效。” 编号-609,光标在“打开wbfile” “文件”tst“无法打开。 系统事件无法打开“Microsoft Excel 97-2004工作表格式”中的文件。 这个错误是在一个对话框中给出的,然后点击'OK'使脚本成功完成。 不知何故,在“告诉过程”中打开一个工作簿Microsoft Excel“”不起作用。 我可以打开“告诉应用程序”Microsoft Excel中的工作簿“,但是我不能按下对话框button。 任何帮助赞赏! set wbfile to "/private/tmp/tst.xls" tell application "Microsoft Excel" activate end tell delay 0.1 tell application "System Events" delay 0.1 tell process "Microsoft Excel" delay 0.1 set foo to open wbfile try set cancel to button "Cancel" of window 1 […]

如何使用AppleScript重命名文件时保留特殊字符

我有一个AppleScript文件来replace通过CSV文件提供的文件名。 虽然我已经得到了脚本的工作,但它与string/文件名的编码有问题。 文件的发现完美。 重命名为像Malmö这样的结果是一个非常奇怪的编码string。 CSV来自Microsoft Excel,我怀疑是不正确的UTF-8编码。 而现在我陷入了如何正确处理编码。 (或者如何转换编码)。 据我所知它有默认的Excel编码ISO 8859-1。 set theFile to (choose file with prompt "Select the CSV file") set thePath to (choose folder with prompt "Select directory") as string set theCSVData to paragraphs of ((read theFile)) set {oldTID, my text item delimiters} to {my text item delimiters, ";"} repeat with thisLine in […]