Jump to content

problem with excel libraries


Recommended Posts

Hi Guys,

I am new to Autoit and i am trying to automate a Excel sheet where the first column(cells) have hyper link for a webpage which has some details.

I got this code from this forum

#include <ExcelCOM_UDF.au3> ; Include the collection

; Open new book, make it visible

Local $oExcel = _ExcelBookNew(1)

; Write a message to the first cell of the first sheet

_ExcelWriteCell($oExcel, "I'm going to fill some cells up with random data", "A1")

; A loop to fill cells up with random data

For $xx = 1 to 10

For $yy = 3 to 15

_ExcelWriteCell($oExcel, Random(22, 55), $yy, $xx)

Next

Next

; Now we'll read a cell and MsgBox the result

Local $sReadCell = _ExcelReadCell($oExcel, "C5")

MsgBox(0, "Cell C5", $sReadCell)

; Now we save it into the temp directory; overwrite existing file if necessary

_ExcelBookSaveAs($oExcel, @TempDir & "\temp.xls", "xls", 0, 1)

; And finally we close out

_ExcelBookClose($oExcel)

but when i run this i get Error:Error opening the file "#include <ExcelCOM_UDF.au3>"

Problem i think is that there is absence library to support the excel functions.The autoit that i am using is latest which was downloaded from website a week ago.

please help me solve the problem

Link to comment
Share on other sites

Hi Guys,

I am new to Autoit and i am trying to automate a Excel sheet where the first column(cells) have hyper link for a webpage which has some details.

I got this code from this forum

#include <ExcelCOM_UDF.au3> ; Include the collection

; Open new book, make it visible

Local $oExcel = _ExcelBookNew(1)

; Write a message to the first cell of the first sheet

_ExcelWriteCell($oExcel, "I'm going to fill some cells up with random data", "A1")

; A loop to fill cells up with random data

For $xx = 1 to 10

For $yy = 3 to 15

_ExcelWriteCell($oExcel, Random(22, 55), $yy, $xx)

Next

Next

; Now we'll read a cell and MsgBox the result

Local $sReadCell = _ExcelReadCell($oExcel, "C5")

MsgBox(0, "Cell C5", $sReadCell)

; Now we save it into the temp directory; overwrite existing file if necessary

_ExcelBookSaveAs($oExcel, @TempDir & "\temp.xls", "xls", 0, 1)

; And finally we close out

_ExcelBookClose($oExcel)

but when i run this i get Error:Error opening the file "#include <ExcelCOM_UDF.au3>"

Problem i think is that there is absence library to support the excel functions.The autoit that i am using is latest which was downloaded from website a week ago.

please help me solve the problem

Hi,

Get the file from this link and copy it into your autoit installation folder, under the "Include" folder.

Link to comment
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
 Share

  • Recently Browsing   0 members

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