Sign in to follow this  
Followers 0
Saytun

Excel functions aren't working for me

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It ain't easy, but there is an automation interface for OOo: Automating OpenOffice.org

Seems like an OOo.au3 UDF might just be possible at some point in the future...

:)


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

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
Sign in to follow this  
Followers 0