# Excel UDF - Script Breaking Changes

The Excel UDF was completely rewritten to support new file formats and new features of Microsoft Excel.
This means that scripts written for AutoIt up to version 3.3.8.1 won't run with later versions and need to be modified.
The following table lists the differences between the old and the new version.
More information can be found in the wiki.
Renamed, removed and changed functions/parameters

Old UDF Function/Parameter | New UDF Function/Parameter | Comments
--- | --- | ---
_ExcelBookAttach | _Excel_BookAttach |
| $oInstance | Added. Object of the Excel instance to be searched.
_ExcelBookClose | _Excel_BookClose |
$fAlerts |  | Removed.
_ExcelBookNew | _Excel_BookNew |
$fVisible |  | Removed.
| $iSheets | Added. Number of sheets to be added to the new workbook.
_ExcelBookOpen | _Excel_BookOpen |
| $oExcel | Added. Excel application object where you want to open the workbook.
_ExcelBookSave | _Excel_BookSave |
$fAlerts |  | Removed.
_ExcelBookSaveAs | _Excel_BookSaveAs |
$vType |  | Name changed to $iFormat. Can be any value of the XlFileFormat enumeration.
$fAlerts |  | Removed.
$iAccessMode |  | Removed.
$iConflictResolution |  | Removed.
| $bReadOnlyRecommended | Added. Allows to display a message when the file is opened, recommending that the file be opened as read-only.
_ExcelColumnDelete | _Excel_RangeDelete |
$iColumn |  | Changed to $vRange range object.
_ExcelColumnInsert | _Excel_RangeInsert |
$iColumn |  | Changed to $vRange range object.
_ExcelFontSetProperties |  | Removed.
_ExcelHorizontalAlignSet |  | Removed.
_ExcelHyperlinkInsert | _Excel_RangeLinkAddRemove | Changed parameters so specific sheets can be addressed.
_ExcelReadArray | _Excel_RangeRead | Changed parameters so specific sheets can be addressed.
_ExcelReadCell | _Excel_RangeRead | Changed parameters so specific sheets can be addressed.
_ExcelReadSheetToArray | _Excel_RangeRead | Changed parameters so specific sheets can be addressed.
_ExcelRowDelete | _Excel_RangeDelete |
$iRow |  | Changed to $vRange range object.
_ExcelRowInsert | _Excel_RangeInsert |
$iRow |  | Changed to $vRange range object.
_ExcelSheetActivate |  | Removed.
_ExcelSheetNameGet |  | Removed.
_ExcelSheetNameSet |  | Removed.
_ExcelWriteArray | _Excel_RangeWrite | Changed parameters so specific sheets can be addressed.
_ExcelWriteCell | _Excel_RangeWrite | Changed parameters so specific sheets can be addressed.
_ExcelWriteFormula | _Excel_RangeWrite | Changed parameters so specific sheets can be addressed.
_ExcelWriteSheetFromArray | _Excel_RangeWrite | Changed parameters so specific sheets can be addressed.
_ExcelSheetAddNew | _Excel_SheetAdd | Changed parameters so specific sheets can be addressed.
_ExcelSheetDelete | _Excel_SheetDelete |
$fAlerts |  | Removed.
_ExcelSheetList | _Excel_SheetList |
_ExcelSheetMove | _Excel_SheetCopyMove | Changed parameters so specific sheets can be addressed.

New functions

New UDF Function/Parameter | Comments
--- | ---
_Excel_BookList | Returns a list of workbooks of a specified or all Excel instances.
_Excel_BookOpenText | Opens a text file and parses the content to a new workbook with a single sheet.
_Excel_Close | Closes all worksheets and the instance of the Excel application.
_Excel_Open | Connects to an existing Excel instance or creates a new one. It's mandatory now to call function _Excel_Open before any other function.
_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_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 | Sorts a cell range.
_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_SheetCopyMove | Copies or moves the specified sheet before or after a specified sheet in the same or a different workbook.