Sign in to follow this  
Followers 0
Guest ronald

files Excel

5 posts in this topic

:"> I have a problem and is the following one:

I need to digitar a information of a file in Excel to another software

(a paguina in Internet for example) this work is repetitive, but I do not see the form of in version 3 of Autoit doing this to help to me somehow

ronald

Share this post


Link to post
Share on other sites

That was slightly rude.

I have a problem and is the following one:

I need to digitar a information of a file in Excel to another software

(a paguina in Internet for example) this work is repetitive, but I do not see the form of in version 3 of Autoit doing this to help to me somehow

ronald

Try using a comma delimted file, or *.CSV

Example: In Excel, we have this table and data.

-+----A----+----B----+----C----+----D----+
1|  123 |        |       |  xyz  |
-+---------+---------+---------+---------+
2|       |   456   |         |       |
-+---------+---------+---------+---------+
3|       |       |  789 |        |
-+---------+---------+---------+---------+

In a CSV, it would look like:

123,,,xyz,
,456,,,
,,789,,

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That was slightly rude.

Come on you can't be serious, I gave him the links regarding all excel related issues.

As noted in several of the topics is "VBA with AutoItX" and "COM" support for AutoIt.

Why repeat what has previously been posted.

This link is better:

http://www.autoitscript.com/forum/index.ph...&highlite=excel

Edited by bshoenhair

Share this post


Link to post
Share on other sites

:"> I have a problem and is the following one:

I need to digitar a information of a file in Excel to another software

(a paguina in Internet for example) this work is repetitive, but I do not see the form of in version 3 of Autoit doing this to help to me somehow

ronald

<{POST_SNAPBACK}>

Hello ronald,

Please don't mind the rudiness of my AutoIt 'colleagues'. ;-)

You can perform this task using COM Objects in AutoIt. But...it's still in pre-beta.

If you don't mind using a pre-beta version of AutoIt, you can download it from the first posting of this topic:

AutoIt 3.1.0++

(First download and install the latest 'release' version of AutoIt, then extract the files from the AutoIt3.1.0.15J.zip file. Place the new AutoIt.exe and AutoIt.chm in %yourprogramsdir%\AutoIt3\ and AutoItSC.bin in %yourprogramsdir%\AutoIt3\Aut2Exe\)

To retrieve information from an Excel sheet, please read carefully the Excel's VBA Help first. You have to know the names of the Objects (worksheets, cells) you are going to work with.

Here is an example that retrieves information from cell A1 from an an Excel document named C:\Worksheet.xls:

$FileName="C:\Worksheet.xls"

if not FileExists($FileName) then
  Msgbox (0,"Excel File Test","Can't run this test, because you didn't create the Excel file "& $FileName)
  Exit
endif

; Mind the double (!) backslashes in this line 
$oExcelFile = ObjGet("c:\\Worksheet.xls"); Get an Excel Object from an existing filename

if IsObj($oExcelFile) then  ; Double check if we got the Object

  $oExcelSheet=$oExcelFile.Worksheets(1)

  $Value=$oExcelSheet.cells(1,1).value
  
  Msgbox(0,"Excel File Test","The value of cell A1 in file " & $Filename & " is: " & $Value)

  $oExcelFile.Close ; Close the Excel File

else
  Msgbox (0,"Excel File Test","Error: Could not open "& $FileName & " as an Excel Object.")
endif

To test the above example, just create a new Excel sheet, fill cell A1 with something and save it as c:\worksheet.xls.

I hope this helps.

Regards,

-Sven

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