Jump to content

Search the Community

Showing results for tags 'excelautomatization'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello wise and respected users of this forum! I haven't used autoit for a long time, but now I try to use it to automate a process in excel (I may be better of using VBA, but I would like to refresh my knowladge) I can open/close excel documents, and can interact with them with Send key commands, but I can't really use the _Excel functions Func ExcelRead() ;Local $oExcel = WinGetHandle("Excel") ;WinActivate($oExcel) ;sleep(1000) Local $oExcel = ObjGet("", "Excel.Application") WinActivate($oExcel) WinActivate("Excel") ;$oExcel.Visible = 1 ;$oExcel.workbooks.add If IsObj($oExcel) Then MsgBox($MB_SYSTEMMODAL, "", "The variable is an object") Else MsgBox($MB_SYSTEMMODAL, "", "The variable is not an object") EndIf Local $aResult = _Excel_RangeRead($oExcel, 1, "A1", 1) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 2", "Error reading from workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeRead Example 2", "Data successfully read." & @CRLF & "Please click 'OK' to display the formulas of cells A1:C1 of sheet 2.") _ArrayDisplay($aResult, "Excel UDF: _Excel_RangeRead Example 2 - Cells A1:C1 of sheet 2") #cs Local $ValamiExcel = WinGetHandle("Excel") Sleep(1000) WinActivate($ValamiExcel) Local $oRange = $ValamiExcel.ActiveSheet.Range("A").EntireColumn #ce EndFunc This is one of my function and I have a problem here. IsObj tells me the $oExcel is an object, right after that I got the 1 - $oWorkbook is not an object or not a workbook object error Honestly I'm not sure what to do with that, I may have some problems with excel terms (workbook is the "entire" excel file that can have different worksheets right?), but i think my code should work and can't really work around this object not object problem. Thank you for any insight or help that you can share with me! and of course have a nice day
×
×
  • Create New...