Shastaman Posted January 31, 2008 Share Posted January 31, 2008 Looking at the examples provided here and in the Help file, I can't figure out how to get directly to the worksheet object. I'm trying to start Excel using normal AutoIt commands (not COM), then open a file, again not using COM. After the file is open, I need to copy a range and work with autofilter. However, the examples in the ExcelCOM_UDF seem to always use the Excel app object and base off of ActiveSheet from there. The help file shows making an object by specifying the spreadsheets absolute path and working from there. Is there a way to directly access workbork and thus worksheet directly without using these methods, or is this the way you should do it? Trying to reconcile the documentation available for Excel COM and what you would do in AutoIt ain't easy. :-) Thanks for your time. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 31, 2008 Moderators Share Posted January 31, 2008 Why are you so avid on not using COM? What you are asking would be quite simple using Excel's Object Model. Link to comment Share on other sites More sharing options...
seandisanti Posted January 31, 2008 Share Posted January 31, 2008 Looking at the examples provided here and in the Help file, I can't figure out how to get directly to the worksheet object.I'm trying to start Excel using normal AutoIt commands (not COM), then open a file, again not using COM. After the file is open, I need to copy a range and work with autofilter.However, the examples in the ExcelCOM_UDF seem to always use the Excel app object and base off of ActiveSheet from there. The help file shows making an object by specifying the spreadsheets absolute path and working from there.Is there a way to directly access workbork and thus worksheet directly without using these methods, or is this the way you should do it?Trying to reconcile the documentation available for Excel COM and what you would do in AutoIt ain't easy. :-)Thanks for your time.I can help, but COM really is the way to go. Are you trying to open a spreadsheet on a system that doesn't have excel? I ask that because that makes sense as a reason to want to try to avoid com to open a sheet. Link to comment Share on other sites More sharing options...
SRAutomater Posted October 2, 2008 Share Posted October 2, 2008 I am having trouble enabling AutoFilter in Excel also. The macro in VB looks like: Sheets("Sheet1").Select Range("A1").Select Selection.AutoFilter I am trying: $oExcel.activesheet.Range("A1").select $oExcel.selection.autofilter I get a COM error though 'Unable to get the AutoFilter property of the Range class" (number 80020009) Any help is appreciated. Thanks 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