Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Excel Automation
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00714397
Message ID:
00714471
Views:
12
This message has been marked as the solution to the initial question of the thread.
Something like this:
ObjExcel= CREATEOBJECT("Excel.Application")
xlValues=-4163
xlPart=2
xlByColumns=2
with ObjExcel
.DisplayAlerts = .f.
.Visible=.t.
.Workbooks.Open(fileXLS)

.Columns("A:A").Select
lcfind="blablabla"

if .Selection.Find(lcfind, ,xlValues,xlPart, xlByColumns).Activate

?.Range("C"+trans(.ActiveCell.row)).text
endif
.Workbooks.Close()
.Quit()
endwith

ObjExcel=.NULL.
release ObjExcel

Best Wishes

>Hi All
>I have an excel workbook where i would like to do the following using automation. The excel file has data in the A B and C columns.
>I would like to search for a string in the A column
>If found, i would like to get the string from the corresponding C column.
>
>That's all!
>
>TIA
>Jaime
Previous
Reply
Map
View

Click here to load this message in the networking platform