motormad 0 Posted February 26, 2011 In my the GUI there is an option to onlt read the first column of the excel file or the intire sheet. if $EenOfTwee = 0 then $aWO_Nr = _ExcelReadArray($oExcel, $iStartRow, $iStartColumn,$iRows,1,0) elseif $EenOfTwee=1 Then $aWO_Nr = _ExcelReadSheetToArray($oExcel) endif the first option works, but _ExcelReadSheetToArray gives my errors. C:\Program Files\AutoIt3\Include\Excel.au3 (787) : ==> Variable must be of type "Object".: Local $sLastCell = $oExcel.Application.Selection.SpecialCells($xlCellTypeLastCell).Address(True, True, $xlR1C1) Local $sLastCell = $oExcel.Application.Selection^ ERROR i open the excel with $FilePath = FileOpenDialog("Go - Choose your excel file as inbuilt one not exists", $FilePath, "Worksheet" & " (" & "*.xls" & ")", 1);+ $Recurse+ $Recurse local $oExcel = ObjGet($FilePath); Create an Excel Object see attachments for the exceltaakwoappart.zip Share this post Link to post Share on other sites
PsaltyDS 39 Posted February 26, 2011 Why not just open it with _ExcelBookOpen()? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
motormad 0 Posted February 27, 2011 $oExcel.Windows (1).Visible = 1; Set the first worksheet in the workbook visible $oExcel.Worksheets (1).Activate $oExcel.ActiveSheet.Visible = 1 $oExcel.Application.Visible = 1 and it works fine :-) Share this post Link to post Share on other sites