Sign in to follow this  
Followers 0
Shastaman

Getting file objects in Excel?

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



Why are you so avid on not using COM? What you are asking would be quite simple using Excel's Object Model.

Share this post


Link to post
Share on other sites

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.


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0