I have written a short program to open an existing Excell.
The code is as below:
When I execute my code, no error, but the file did not open. (The name of the file is Music Theory.xlsx)
Any help is highly appreciate.
Thank you
Mary
#include <Excel.au3>
#include <array.au3>
Local $sFilePath1 = "C:UsersmnguyenDesktopMy Doc & Music Theory.xlsx" ;This file should already exist
Local $oExcel = _ExcelBookOpen($sFilePath1)
$oExcel = _ExcelBookOpen("$sFilePath1, 0") ; Open Excell in the background
_ExcelSheetActivate($oExcel,"Music Theory.xlsx") ; Name of the sheet
$aArray = _ExcelReadSheetToArray($oExcel, 2) ; ignoring the header row (So it starts from 2, By default, starts from 1)
_ArrayDisplay($aArray, "Array using Default Parameters")
For $i = 1 to UBound($aArray)
$name = $aArray[$i][1] ; Storing the array values in a variable $name
MsgBox(0,'debug', $name) ; Displaying the values using message box
Next
_ExcelBookClose($oExcel) ; close excel