randallc Posted July 26, 2005 Share Posted July 26, 2005 Hi, Here is a first attempt at taking $TextPath="c:\text.txt" to Excel file $FilePath="c:\list.xls" Change them as you need. Lett me know how you go; 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...
Fabre Posted July 29, 2005 Author Share Posted July 29, 2005 (edited) Thanks a million Randall, I really appreciate your help. --- Now for something completely different Still in devtrack I am using a script to close bugs, a few comboxbox to select from, some Edit fields, etc One of the Edit field is causing me some issue it seems to change number at each new session, so for example it's Edit 14 when I make the script but the on the next day it's Edit13. Is there a way to detect it's ID? Edited July 29, 2005 by Fabre Link to comment Share on other sites More sharing options...
randallc Posted July 30, 2005 Share Posted July 30, 2005 (edited) Hi,I don't know about those Window control issues; try Gary again?Others; 1.Except for the change I mentioned earlier, I am using your script as isI thought youmight have had it in a loop or something; certainly looks OK2. it will recaluculate all the cells Does it do that if you just paste, or only if you save the sheet or close it etc?3. So how do you open a xls$FilePath="c:\AAA\tracking.xls"If Not FileExists($FilePath) Or Not StringInStr($FilePath, "xls") Then $FilePath = FileOpenDialog("Go - Choose your excel file as inbuilt one not exists", $FilePath, "Worksheet" & " (" & "*.xls" & ")", 1);+ $Recurse+ $RecurseEndIfIf StringInStr($FilePath, " ") Then $FilePath = '"' & $FilePath & '"'$Command = @ComSpec & " /c " & 'start excel.exe '& $FilePath $ExcelOpen=RunWait($Command, @SystemDir, @SW_SHOW)Probably better ways, but this keeps @compspec OK if you use file or dorectory names with spaces.Let me know how you go...RandallEDIT; PS ** The excelcom will "error" out , I think, if you leave the sheet open before you use the function, so take care.EDIT or , same as above, but command line without using DOS;$Command = @ProgramFilesDir&"\microsoft office\office11\excel.exe "& $FilePath Edited July 30, 2005 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...
randallc Posted July 30, 2005 Share Posted July 30, 2005 (edited) Hi again,I will post my update to the excelCOM function soon.It incorporates the following lines, which you could change yourself;(though the next version will also have a n extra parameter if you change to that) .Application.Visible = $Visible $xlCalculationManual=-4135 $xlCalculationAutomatic=-4105 $Calculation=.Application.Calculation .Application.Calculation = $xlCalculationManual $RowExcel=$RowYou can see in "func" where to put this, as I included line before and after; it checks status of "autocalc", turns it tto manual anywayThe next lines, lower in "func", revert the status to what it was (auto usually?) If $Save = "Save" Then .Save .Application.Calculation = $Calculation EndIf Best, RandallEDIT - I have now added nwer func version. Edited July 30, 2005 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...
GaryFrost Posted July 30, 2005 Share Posted July 30, 2005 Thanks a million Randall, I really appreciate your help.---Now for something completely differentStill in devtrack I am using a script to close bugs, a few comboxbox to select from, some Edit fields, etcOne of the Edit field is causing me some issue it seems to change number at each new session, so for example it's Edit 14 when I make the script but the on the next day it's Edit13.Is there a way to detect it's ID?<{POST_SNAPBACK}>if you can make the control have focus you could use ControlGetFocus to get the current ClassNameNN SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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