Jump to content

Recommended Posts

Posted

Hi, I'm trying to do some very basic Excel file manipulation. However, I can't even get AutoIt to open up Excel files for reading!

My code is extremely simple, taken verbatim from the help files.

#include <Excel.au3>

$sFilePath1 = @ScriptDir & "\filename.xls"; open excel file
$oExcel = _ExcelBookOpen($sFilePath1)

If @error = 1 Then
    MsgBox(0, "Error!", "Unable to Create the Excel Object")
    Exit
ElseIf @error = 2 Then
    MsgBox(0, "Error!", "File does not exist - Shame on you!")
    Exit
EndIf

Yes, "filename.xls" exists and is in the same directory as the .au3 script (both are on the desktop). When I try running the script, I get the "Unable to create the Excel object" error, so I'm not exactly sure what's wrong.

I don't actually have Microsoft Excel installed, but rather I'm using OpenOffice's alternative, could that be the problem here?

  • Developers
Posted

I don't actually have Microsoft Excel installed, but rather I'm using OpenOffice's alternative, could that be the problem here?

You will require the Excel com objects for these UDFs to work tho!

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...