General information
Category:
COM/DCOM and OLE Automation
Title:
Help - How Read Excel cells to VFP
I'm working with Excel spreadsheet and must READ a Range of values from
cells to import those values to VFP.
I know that the Column range always goes from cell D15 to L15,(this case)
But the number of columns can vary from 1 row to more than 4000 rows.
Question: How can I define the Range in this case, so I could pass
the contents off all cells to VFP/Or how can I know the number os rows
for a range, then its always relative the number of rows it will have.
Does this kind of code also work with non continuos range ?
oRange = oExcel.ActiveSheet.Range("x:y")
FOR nRow = 1 TO oRange.Rows.Count
FOR nColumn = 1 TO oRange.Columns.Count
? oRange.Cells[nRow, nColumn].Value
ENDFOR
ENDFOR
Please help !!
Thanks in Advance.
Peter
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only