Jack_10 Posted August 27, 2006 Share Posted August 27, 2006 hi My program use some *.txt files (notepad) and i wanna put all those informattion from *.txt files to one exel file. And then program will open only one file (probably program will run faster) and search exels lines (possillby also some colums A,B,C etc) I have tried save information to exel file but then AutoIt3 cant count lines. Link to comment Share on other sites More sharing options...
Bert Posted August 27, 2006 Share Posted August 27, 2006 search for excelCOM.au3 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Jack_10 Posted August 27, 2006 Author Share Posted August 27, 2006 search for excelCOM.au3thx mani have downloaded it, unziped and paste into D:\Program Files\AutoIt3\Include ( to use <include>)i have read script but still need simple code example to see how to use this excelCOM.au3 file.i have xxx.xls file on desktopsome rows and 2 colums (1 column - number, 2 - text )can anyone paste here simple example how can i open this file (not run if it is possible)and do something like this :$x = (1 row, 1 column)$y = (2 row, 2 column)msgbox(0,"1 row, 1 column",$x)msgbox(0,"2 row, 2 column",$y) Link to comment Share on other sites More sharing options...
randallc Posted August 27, 2006 Share Posted August 27, 2006 (edited) Hi, Try unzipping all the zip file to current directory; then try "_XLArrayExample2Single.au3" or "XLsyntaxshort3.au3" to give you some idea. let me nkow if you're still in doubt. Best ,Randall [PS they will run, "NOT visible" if you set that parameter to zero] Edited August 27, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Jack_10 Posted August 27, 2006 Author Share Posted August 27, 2006 Hi, Try unzipping all the zip file to current directory; then try "_XLArrayExample2Single.au3" or "XLsyntaxshort3.au3" to give you some idea. let me nkow if you're still in doubt. Best ,Randall [PS they will run, "NOT visible" if you set that parameter to zero] i have pasted all unziped files to /include ... when i try run "_XLArrayExample2Single.au3" or any other file from there there is error : Error reading the file: GuiListView.au3 i have searched this file on my all HDD , but i didt find it Link to comment Share on other sites More sharing options...
randallc Posted August 27, 2006 Share Posted August 27, 2006 Hi, Yes, As I said: "Try unzipping all the zip file to current directory" I don't know that it is ever a good idea to try to run from that "Include" directory; use a different main script directory and put all these unzipped files there instead?... Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Jack_10 Posted August 28, 2006 Author Share Posted August 28, 2006 (edited) Hi,Yes, As I said:"Try unzipping all the zip file to current directory"I don't know that it is ever a good idea to try to run from that "Include" directory; use a different main script directory and put all these unzipped files there instead?...Randalloki make new folder E:\ExcelExamples and here i have unziped all files from ExcelExamples.zip (10 files after unziped)i have run "_XLArrayExample2Single.au3" from ther directory and still have the same errordo i have to do any change in code before i run "_XLArrayExample2Single.au3" ?code :#include"ExcelCom.au3";#include <Array.au3>$FilePath=@ScriptDir&"\Blank5.xls"$DataString="12,7,6,9,23,45,3,17,18,9"&@CRLF&"3,12,7,6,9,23,45,3,17,18"&@CRLF&"3,12,8,6,9,23,45,3,17,18"&@CRLF&"3,12,9,6,9,23,45,3,17,18"$DataString=StringReplace($DataString,",",@TAB);MsgBox(0,"","$DataString="&$DataString)$XLRange=_XLpaste($FilePath,1,"Z",11,$DataString,1);MsgBox(0,"","$XLRange="&$XLRange)$XLArray=_XLArrayRead($FilePath,1,$XLRange)_Array2dDisplay($XLArray, "Array as read",0)_Array2DTo1D($XLArray,"Array", 0,9,1)_XLShow($FilePath,1,"Z",11)MsgBox(0,"","Here, Sheet 1")_XLClose($FilePath,1)do i have to change this line :$FilePath=@ScriptDir&"\Blank5.xls" for $FilePath=@ScriptDir&"\xxx.xls" and paste xxx.xls file in the same directory (E:\ExcelExamples)or just have to download missing file : GuiListView.au3i have brainstorm and dont know what i have to do Edited August 28, 2006 by Jack_10 Link to comment Share on other sites More sharing options...
randallc Posted August 28, 2006 Share Posted August 28, 2006 Yes, but that should not be your error "$FilePath=@ScriptDir&"\Blank5.xls" for $FilePath=@ScriptDir&"\xxx.xls" and paste xxx.xls file in the same directory (E:\ExcelExamples)" can you plesae post the console output from your error? maybe you have a wrong autoIt version? 3.2.0.0 or later? Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Jack_10 Posted August 28, 2006 Author Share Posted August 28, 2006 (edited) Yes, but that should not be your error"$FilePath=@ScriptDir&"\Blank5.xls" for $FilePath=@ScriptDir&"\xxx.xls" and paste xxx.xls file in the same directory (E:\ExcelExamples)"can you plesae post the console output from your error?maybe you have a wrong autoIt version? 3.2.0.0 or later?Best, Randallye !!!i have 3.1.1.0 versiondo i have to download new or just use update "check for updates"ok i have new version 3.2.0.1 anf now have this mising file !! and work !thx man one more time Edited August 28, 2006 by Jack_10 Link to comment Share on other sites More sharing options...
randallc Posted August 28, 2006 Share Posted August 28, 2006 hiinstructionsI think you won't need beta version straight away; but 3.2.0.0 needs un-install of old version first, I think.best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Jack_10 Posted August 28, 2006 Author Share Posted August 28, 2006 (edited) hiinstructionsI think you won't need beta version straight away; but 3.2.0.0 needs un-install of old version first, I think.best, Randallok next problem i have run "XLsyntaxshort3" to read 1 row and A column. like this :#include"ExcelCom.au3"$FilePath=@ScriptDir&"\xxx.xls"$var1=_XLread($FilePath,1,"A1",1,1)msgbox (0,"_XLread=",$var1)(in excel 1 row,1 column is big number : 1772025543)and autoit read is like : 1772025600another example (in excel 1 row,1 column is big number : 3049121675)and autoit read is like : 3049121792probably have to increase numer after decimal point or something like this ... Edited August 28, 2006 by Jack_10 Link to comment Share on other sites More sharing options...
randallc Posted August 28, 2006 Share Posted August 28, 2006 (edited) Yes, I think there is a bug report in about AutoIt new version [COM, not the Excel UDF as I understand it, as happens elsewhere], and awaiting outcome; used not to be a problem, i think. [see 3 links below]the information read is NOT the same that is writtencopy/paste bug back with .133, Fixed 3.2.1.1Yes, it's fixable..May have to wait..Randall[did you go to the beta version, 3.2.1.1?]PS - I have tried Blitzkrg's example script and it is working OK in that version.! - good luck Edited August 28, 2006 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Jack_10 Posted August 29, 2006 Author Share Posted August 29, 2006 Yes, I think there is a bug report in about AutoIt new version [COM, not the Excel UDF as I understand it, as happens elsewhere], and awaiting outcome; used not to be a problem, i think. [see 3 links below] the information read is NOT the same that is written copy/paste bug back with .133, Fixed 3.2.1.1 Yes, it's fixable .. May have to wait.. Randall [did you go to the beta version, 3.2.1.1?] PS - I have tried Blitzkrg's example script and it is working OK in that version.! - good luck ye bete is ok for this script and solution for this problem ... but i hope so beta doestn give me more problems then profit are there any big bug in beta that can hurt my script that was writen in 3.2.0.1 verion ? Link to comment Share on other sites More sharing options...
randallc Posted August 29, 2006 Share Posted August 29, 2006 Hi, Personally, i don't think it's likely to be a problem; but i'm not a developer! PS You will find, if you are reading and manipulating data from one or 2 sheets only at a time, that reading the sheet to an array is fast [using _XLArrayRead func]; then manipulate it in AutoIt; then save back the array [_XLArrayWrite] - see examples for use. It saves on repeated com calls to excel. Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now