Sytze,
Just had a little play and this is basically the way you do it:
oExcel=CreateObject("Excel.Application")
oExcel.Visible=.T.
oWorkbook=oExcel.Workbooks.Add()
oSheet=oWorkbook.Sheets(1)
* Now Manually add in some text in column 1 to search on
* ...containing "Hello"
oRange=oSheet.Range("A1:A20")
vReturn=oRange.Find("Hello")
* vRreturn gives back an object containing the found text
* ...one property is "Address" which gives you the absolute address
* where the find has taken place eg $A$5
? vReturn.Address
There are obviously various parameters in the ".Find(.....)" method you can
add in to search forwards, backwards etc but this should get you on the
right track.
Dave Crozier
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Sytze de Boer
Sent: 28 November 2007 02:00
To: [email protected]
Subject: VFP and Excel automation
Hi folk
My client has an extremely large XLS spreadsheet and several columns
are very wide
Column 1 is the SKU, column 5 is the price
I need to update column 5 based on my stock file price
I have a fair amount of "creating" or populating an existing
spreadsheet with a VFP module, but this one requires me to FIND the
SKU in the existing spreadsheet, and then change the cell reference.
e.g. E66 or E2500
I already have Hentzen's book and it explains how to search and
replace within a Word doc, but not with Excel
Can anyone help me with this ?
(For various reasons, it is not practical to import the data and then
re-export)
Regards
--
Sytze de Boer
Kiss Systems
Ph: 64-7-8391670
Mob:021 937611
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.