GAM Posted February 18, 2008 Share Posted February 18, 2008 HI, Can any one help me ....My whole idea is to run a excel macro from autoit script, I included excel macro commands into autoit but failing at the LINE 4. SCRIPT ------------------ With $oExcel 1 WinActivate("C:\Documents and Settings\epo\Desktop\VSE85\test case 1.txt_85_01181107.XLS") 2 .Charts.Add 3 .ActiveChart.ChartType = IsString("xlLineMarkers") 4 .ActiveChart.SetSourceData Source:=Sheets("TC1").Range("A1:D276"), PlotBy:=xlRows EndWith ---------------- ERROR DISPLAYED IS AS FOLLOWS... ------------------------------------ C:\Documents and Settings\epo\Desktop\Excel_Autoit.au3 (7) : ==> Unable to parse line.: .ActiveChart.SetSourceData Source:=Sheets("TC1).Range("A1:D276"), PlotBy:=xlRows .ActiveChart.SetSourceData Source^ ERROR >Exit code: 1 Time: 0.211 --------------------------------------- Neil Link to comment Share on other sites More sharing options...
GAM Posted February 19, 2008 Author Share Posted February 19, 2008 CAn anyone help me answering the above error, as its very important to me in my project. Neil Link to comment Share on other sites More sharing options...
Kerros Posted February 19, 2008 Share Posted February 19, 2008 I would check into using an Excel UDF.. there are several excellent ones available. The one I use is ExcelCOM_UDF.au3. Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 19, 2008 Moderators Share Posted February 19, 2008 With the little amount of information you have given, this is my best guess. Const $xlRows = 1 Const $xlLineMarkers = 65 WinActivate("C:\Documents and Settings\epo\Desktop\VSE85\test case 1.txt_85_01181107.XLS") With $oExcel .Charts.Add .ActiveChart.ChartType = $xlLineMarkers .ActiveChart.SetSourceData(.Sheets("TC1" ).Range("A1:D276"), $xlRows) EndWith 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