motormad Posted February 26, 2011 Share 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 26, 2011 Share 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 Link to comment Share on other sites More sharing options...
motormad Posted February 27, 2011 Author Share 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 :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now