MaCgyver Posted March 7, 2006 Share Posted March 7, 2006 I posted this in the GUI section, but maybe this is where I should post it. Well I am looking to do the following. In a specific .csv file I want to sort out two specific types of data. One particular column has either XX or YY in the cells. My boss wants me to sort them out, so that we get totals for XX and YY in a report. The .CSV appends data to it through the day and that was done with the autoit and the help of BigDod or was it BidDod? . Anyway this would be easy to do within the file, but the users can't have access to manipulate data, so I have to find another method. I am working with the file to see if can put sometype of protection within the worksheet that would allow them to sort and get the totals they are looking for, but not edit the cells. I haven't had to much luck with that idea and my boss probably won't go for it. So before I go work on it somemore I wanted to ask the autoit pros. If autoit could search for all the ROWS that have XX in the first column and import it into something else and the same for all the ROWS that have YY and provide totals for each than my task would be done. I've used autoit on a few other tasks for this project that I am on and it has worked out perfectly. I don't expect Autoit to do everything and if can't do this task I still believe its a powerful software. If it could help me with this task that would just be like have an early Christmas or something. cliff note: import specific data from a .csv file into some type of grid that cannot be edited by users Link to comment Share on other sites More sharing options...
ChrisL Posted March 7, 2006 Share Posted March 7, 2006 If you posted a CSV file and said specifically what you want to pull out of it then I'm sure someone could help [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Fossil Rock Posted March 7, 2006 Share Posted March 7, 2006 (edited) Are you using Excel? If you are then Excel can do it pretty easily. Look into pivot tables. Edited March 7, 2006 by Fossil Rock Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
MaCgyver Posted March 7, 2006 Author Share Posted March 7, 2006 someone gave me a script and i edited for my needs. this is what i have. Global $PI_count = 0, $PO_count = 0 $file = FileOpen('GLDAILY.CSV', 0) $file2 = FileOpen('gldailyPI.csv',1) $file3 = FileOpen('gldailyPO.csv',1) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to READ file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $data = StringSplit($line, ",") If $data[2] = "PI" Then $PI_count = $PI_count + $data[7] FileWriteLine($file2,$line) Else; It's assumed that $data[2] = "PO" $PO_count = $PO_count + $data[7] FileWriteLine($file3,$line) EndIf Wend ;MsgBox(0x1000,"Output", "PI SUM is " & $PI_count) ;MsgBox(0x1000,"Output", "PO SUM is " & $PO_count) FileClose($file) FileClose($file2) FileClose($file3) ;Can I use FileClose($file,file2,$file3) instead? I will have to make more changes to it b/c my boss wants only one file. She doesn't want two files, but at least I know autoit can do it now. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 7, 2006 Moderators Share Posted March 7, 2006 (edited) Pick a thread man... double posting is confusing!: http://www.autoitscript.com/forum/index.php?showtopic=22707 Edited March 7, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
seandisanti Posted March 7, 2006 Share Posted March 7, 2006 Pick a thread man... double posting is confusing!: http://www.autoitscript.com/forum/index.php?showtopic=22707is it just me, or is double posting increasting in frequency? Link to comment Share on other sites More sharing options...
seandisanti Posted March 7, 2006 Share Posted March 7, 2006 Pick a thread man... double posting is confusing!: http://www.autoitscript.com/forum/index.php?showtopic=22707is it just me, or is double posting increasting in frequency? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted March 7, 2006 Moderators Share Posted March 7, 2006 is it just me, or is double posting increasting in frequency?Who is doing the double posting now??? Link to comment Share on other sites More sharing options...
seandisanti Posted March 7, 2006 Share Posted March 7, 2006 Who is doing the double posting now??? therein lies the joke... but i think we really have been seeing alot more redundancy than usual the last couple of weeks. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted March 7, 2006 Moderators Share Posted March 7, 2006 therein lies the joke... but i think we really have been seeing alot more redundancy than usual the last couple of weeks.The forum keeps growing at an incredible rate. Over 3000 users on the forum this morning, thats going to put a huge load on the database. So when the forum doesn't respond right away they click the button again. 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