Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - How Read Excel cells to VFP
Message
 
To
21/06/2001 13:54:40
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00521266
Message ID:
00522465
Views:
13
Peter,

I have never used groups in Excel while automation. And I could not find simple solution to your question.
Just some thoughts.
1. If records in a group have something in common, then you can just 'append' like:
create table (tablenam) (field_1 c(5))
append from XLSSource.xls xls for field_1="b"

2. If you assign NAME to each group, it may help. NAME object seems appropriate here.

3. If the group end is marked somehow (empty field, for instance), then you can calculate the number of rows in a group while looping in Excel and searching for end group marker.

Good Luck

>>>>>>>>>>>>>>>> your message below >>>>>>>>>>>>>>>>>>

Yuri, sorry for the delay...

I use .UsedRange.Rows.Count, and it returns the number of rows used in an entire active sheet no mather if the data is stored in groups of information.

In my case supose data begins in row 16A with a name of a group of information,
jump one Row and start with the data in from cell A18:N18 to A24:N24 about this group, jump 2 lines and start another new group name of information, jumps again 1 row and start with data where the number of rows/columns change at each group.

I know that a range is an object, and to optimize the copy of the data to VFP, I'm trying to get the range of a group of cells without knowing the size of it, not only the last row with an non empty cell what .UsedRange.Rows.Count does.
I want to find a function that could return the number of Rows/Columns like
.UsedRange.Rows.Count, but only till an empty cell, or better and condition be .T. or .F., or till next cell be of an different datatype.

Have you someday made a copy from a Excel to VFP, where the data has many group's of information ?
How did you got the range of aech group of data ?

Anyway your helping me a lot with your tips...

Thank you !

Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform