-
August 24th, 2005, 11:04 PM
#1
-
August 25th, 2005, 12:09 AM
#2
Re: Excel Automation
How can i parse the content of Range returned by _WorkSheet->UsedRange?
Ing Ngarso sung Tuladha -> The Leader gives the lesson
-
August 26th, 2005, 04:50 AM
#3
Re: Excel Automation
Hi.. It's me again.. still with some desperation..
How to select cell not by it's name but by it's index?
For example A1 is index 1,1 and A2 is index 1,2, etc.
Does the Excel::_Worksheet::GetUsedRange() function has a bug or something? coz i have 2 row and 5 column (2x5) of data. I call the function at the first time, it returns 2x5 range (which is correct). Then i expand/add the data to became 5x5, the function returns 5x5 size (which is.. still.. correct). But when i contract the data size into 3x5 or 4x5 and i recall the function, it still return 5x5. Does the function has a bug, or it's intended to do so..?
So how can i get the valid range that contains the real data?
Thanks..
Ing Ngarso sung Tuladha -> The Leader gives the lesson
-
August 26th, 2005, 05:25 AM
#4
Re: Excel Automation
look at these links
Cheers
-
August 26th, 2005, 06:28 AM
#5
Re: Excel Automation
As you see, GetUsedRange (or UsedRange.Rows.Count) is returning the maximum size a range has ever had. This is not specific to automation. You have the same phenomenom with Excel VBA.
A workaround in Excel VBA (sorry I don't know its equivalent in automation) is using ...End(xlDown) or ..End(xlUp).
-
August 29th, 2005, 02:04 AM
#6
Re: Excel Automation
Holly god..
It works well. I Used RangePtr->End(xlDown) & RangePTr->End(xlToRight), I can get the valid used range. Thanks, ur great
Ing Ngarso sung Tuladha -> The Leader gives the lesson
-
August 29th, 2005, 02:21 AM
#7
Re: Excel Automation
Now.. how can i get the active/selected cells? There are active sheets, active table, but no active cells or selected cells.
Ing Ngarso sung Tuladha -> The Leader gives the lesson
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|