Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activation a Formula in Excel from VFP8
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01335312
Message ID:
01335472
Views:
19
>Below is some data created in a VFP Table and COPY TO SpreadSheet.XLS TYPE XL5
>Once in the worksheet the Hyperlink can be physically activated by double-clicking in a cell on column B and pressing return. Once activated this then can be copied to every cell in that column. This work fine interactively.
>
>I want to reproduce this using automation. Any ideas? How do I programmatically active the Hyperlink?
>
>
>Sample of Data in a Worksheet
>
>Column B             Column O                                           Column P
>=HYPERLINK(O2,P2)    https://www.questback.com/-63659397-rQqLrOoc	OLDGN@PARK158912.47771
>=HYPERLINK(O3,P3)    https://www.questback.com/-63659976-bFmuNuaW	OLDGN@6445.46841
>=HYPERLINK(O4,P4)    https://www.questback.com/-63659975-VKqXgRxS	OLDGN@6445.47558
>=HYPERLINK(O5,P5)    https://www.questback.com/-63658304-KUBECjHy	OLDGN@PARK219167.46555
>
try:
LOCAL oExcel AS Excel.Application
oExcel = CREATEOBJECT([Excel.Application])
oExcel.Visible = .t.
oExcel.Workbooks.Add()
oExcel.ActiveSheet.Range([O2]).Value = [https://www.questback.com/-63659397-rQqLrOoc]
oExcel.ActiveSheet.Range([P2]).Value = [OLDGN@PARK158912.47771]
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.Range([B2]),oExcel.Range([O2]).Value,,,oExcel.Range([P2]).Value)

oExcel.ActiveSheet.Range([O3]).Value = [https://www.questback.com/-63659976-bFmuNuaW]
oExcel.ActiveSheet.Range([P3]).Value = [OLDGN@6445.46841]
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.Range([B3]),oExcel.Range([O3]).Value,,,oExcel.Range([P3]).Value)

oExcel.ActiveSheet.Range([O4]).Value = [https://www.questback.com/-63659975-VKqXgRxS]
oExcel.ActiveSheet.Range([P4]).Value = [OLDGN@6445.47558]
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.Range([B4]),oExcel.Range([O4]).Value,,,oExcel.Range([P4]).Value)

oExcel.ActiveSheet.Range([O5]).Value = [https://www.questback.com/-63658304-KUBECjHy]
oExcel.ActiveSheet.Range([P5]).Value = [OLDGN@PARK219167.46555]
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.Range([B5]),oExcel.Range([O5]).Value,,,oExcel.Range([P5]).Value)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform