Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Excel Automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00714397
Message ID:
00714471
Vues:
13
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform