FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EXCEL CREATE HYPERLINK
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
EXCEL CREATE HYPERLINK
Posted: Thu Mar 28, 2024 11:45 AM
Hi,
I have to create an hyperlink from cell A1 of sheet2 to cell A1 of sheet1
If I click on the cell "MARCO" I want to go to the cell "BOSCHI"
When I click on it I have this alert (italy)

"Indirizzo del sito non valido. Controllare l'indirizzo e riprovare"
What I'm doing wrong?
bye
Code (fw): Select all Collapse
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oExcel
LOCAL oAs1, oAs2


oExcel := CREATEOBJECT( "Excel.Application" )
oExcel:Workbooks:Add()

iConta := oExcel:WorkSheets:count
oExcel:WorkSheets:Add( oExcel:WorkSheets( iConta ) )
oAs1       := oExcel:ActiveSheet()

oAs1 := oExcel:Activesheet()
oAs1:name := "UNO"


iConta := oExcel:WorkSheets:count
oExcel:WorkSheets:Add( oExcel:WorkSheets( iConta ) )
oAs2       := oExcel:ActiveSheet()

oAs2 := oExcel:Activesheet()
oAs2:name := "DUE"

oExcel:Worksheets( "Foglio1" ):Delete()
oExcel:Worksheets( "Foglio2" ):Delete()
oExcel:Worksheets( "Foglio3" ):Delete()


oExcel:Visible := .T.

oAs2:Range( "A1" ):Value := "MARCO"
oAs1:Range( "A1" ):Value := "BOSCHI"

// oAs1:Hyperlinks:Add( oAs2:Range( "A1" ), oAs1:Range( "A1" )   )

oAs1:Hyperlinks:Add( oAs2:Range( "A1" ), oAs1:Range( "A1" )   )


RETURN NIL
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: EXCEL CREATE HYPERLINK solved
Posted: Thu Mar 28, 2024 01:18 PM
In this way
oAs2:Range("A1"):value := [=COLLEG.IPERTESTUALE("#UNO!A1";"MARCO")]

:idea:
Marco Boschi
info@marcoboschi.it
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: EXCEL CREATE HYPERLINK
Posted: Fri Mar 29, 2024 08:32 PM
Thanks Marco!
Here is: oAs2:Range("A1"):value := [=COLLEG.IPERTESTUALE("#UNO!A1";"MARCO")]
Note: Some sites: (https://pt.excelfunctions.eu/) translate COLLEG.IPERTESTUALE (HYPERLINK) to HIPERLIGAÇÃO that gives ERROR.
The correct is (here in Brazil): oAs2:Range("A1"):value := [=HIPERLINK("#UNO!A1";"MARCO")]
Regards, Euclides
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: EXCEL CREATE HYPERLINK
Posted: Tue Apr 02, 2024 09:40 AM

When I click on cell from the worksheet named "MASTER" that has a hyperlink to another cell in "DETAILS" worksheet I found the cell in the bottom of the video. This almost always happens.

Is it possible to scroll the worksheet so that when I go into a cell that it is positioned in the upper left corner of my window so I can see other rows.

To understand it is a master detail relationship between header and rows of bills.

Many thanks

Marco

Marco Boschi
info@marcoboschi.it

Continue the discussion