

Excel.au3はExcelをAutoitから動かすためのUDF(ユーザーが作った関数)です。進化してるので、関数なくなり、新しいものに置き換わってるようです。
AutoitはBasic言語に似た文法で、いろいろなものを自動化することができます。画像認識もできます。
勉強中のサイト(Autoitでグラフを使う):
ルーレット当たり外れなどをExcelに記入してます:
Excel UDFのダウンロード先:

サンプルがうまく動かないので、何故か調べていたら「Excel.au3」が更新されているので使えない関数・新しくなったものといろいろ変更されているようです。
Autoitのサイトのサンプルが正しいとは限りません。動かないときはいろいろ調べてみましょう。
英語の新旧・比較サイト:
Excel.au3 大きな変更点
古いバージョン | 新しいバージョン | |
_ExcelRowDelete | _Excel_RangeDelete | |
$iRow | Changed to $vRange range object. | |
_ExcelRowInsert | _Excel_RangeInsert | 行の挿入 |
_ExcelWriteCell | _Excel_RangeWrite | Changed parameters so specific sheets can be addressed. |
_ExcelSheetActivate | 廃止 | |
_ExcelSheetNameGet | 廃止 |
_ExcelRowInsert => _Excel_RangeInsert (行の挿入)
一行目の間違いを直しました
例)3行目に一行追加
#include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWork = _Excel_BookNew($oExcel) ;// _ $oExcel.Cells(1,1).value = 123 $oExcel.Cells(2,1).value = 222 $oExcel.Cells(3,1).value = 333 _Excel_RangeInsert($oWork.Activesheet,"3:3") ;// 3行目に一行 <<< ;開始行:終わりの行

_Excel_RangeInsert($oWork.Activesheet,"3:4") ; "3:4"に変えれば 3行目と4行目追加

_ExcelWriteCell > _Excel_RangeWrite パラメータが変更に
#include <Excel.au3>
_Excel_RangeWrite ( $oWorkbook, $vWorksheet, $vValue [, $vRange = "A1" [, $bValue = True [, $bForceFunc = False]]] )
ワークシートの指定ができるようになったようです。この関数はセルに値書き込みます。
_Excel_RangeWrite ( $oWork,"sheet1" , 999 , "C1")

UDF関数一覧
_Excel_BookAttach | Attaches to the first instance of a workbook where the search string matches based on the selected mode |
_Excel_BookClose | ワークブックを閉じる |
_Excel_BookList | Returns a list of workbooks of a specified or all Excel instances |
_Excel_BookNew | 新しいワークブックを作成 |
_Excel_BookOpen | Opens an existing workbook |
_Excel_BookOpenText | Opens a text file and parses the content to a new workbook with a single sheet |
_Excel_BookSave | Saves the specified workbook |
_Excel_BookSaveAs | Saves the specified workbook with a new filename and/or type |
_Excel_Close | Closes all worksheets and the instance of the Excel application |
_Excel_ColumnToLetter | Converts the column number to letter(s) |
_Excel_ColumnToNumber | Converts the column letter(s) to a number |
_Excel_ConvertFormula | Converts cell references in a formula between A1 and R1C1 reference styles, relative and absolute reference type, or both |
_Excel_Export | Exports a workbook, worksheet, chart or range as PDF or XPS |
_Excel_FilterGet | Returns a list of set filters |
_Excel_FilterSet | Sets/unsets filter definitions and filters the range |
_Excel_Open | Connects to an existing Excel instance or creates a new one |
_Excel_PictureAdd | Adds a picture on the specified workbook and worksheet |
_Excel_Print | Prints a workbook, worksheet, chart or range |
_Excel_RangeCopyPaste | Cuts or copies one or multiple cells, rows or columns to a range or from/to the clipboard |
_Excel_RangeDelete | Deletes one or multiple cells, rows or columns from the specified worksheet |
_Excel_RangeFind | Finds matching cells in a range or workbook and returns an array with information about the found cells |
_Excel_RangeInsert | Inserts one or multiple empty cells, rows or columns into the specified worksheet |
_Excel_RangeLinkAddRemove | Adds or removes a hyperlink to/from a specified range |
_Excel_RangeRead | Reads the value, formula or displayed text from a cell or range of cells of the specified workbook and worksheet |
_Excel_RangeReplace | Finds and replaces matching strings in a range or worksheet |
_Excel_RangeSort | セルをソート |
_Excel_RangeValidate | Adds data validation to the specified range |
_Excel_RangeWrite | Writes value(s) or formula(s) to a cell or a cell range on the specified workbook and worksheet |
_Excel_SheetAdd | Adds new sheet(s) to a workbook and sets their names |
_Excel_SheetCopyMove | Copies or moves the specified sheet before or after a specified sheet in the same or a different workbook |
_Excel_SheetDelete | Deletes the specified sheet by object, string name or by number |
_Excel_SheetList | Returns a list of all sheets in the specified workbook |
コメント