Hi
oSheet:Cells( 12,6 ):Value := '=HYPERLINK("c:\abc\TEST1.xlsx", "oExcel:Sheets(1):Select()" )'
How to hyperlink to sheet 1 of Test1
Thanks
Regards
ACWoo
Using bcc582 + FHW
acwoo1 wrote:Hi
oSheet:Cells( 12,6 ):Value := '=HYPERLINK("c:\abc\TEST1.xlsx", "oExcel:Sheets(1):Select()" )'
How to hyperlink to sheet 1 of Test1
Thanks
Regards
ACWoo
Using bcc582 + FHW
=HYPERLINK("[C:\MyFolderName\MyExcelFile.xlsx]Sheet1!C5","CLICK HERE")
acwoo1 wrote:Hi
=HYPERLINK("[C:\MyFolderName\MyExcelFile.xlsx]Sheet1-A!C5","CLICK HERE")
If the page (Sheet1-A) has a hyphen, the link is not valid. How to overcome this.
=HYPERLINK("[C:\MyFolderName\MyExcelFile.xlsx]'Sheet1-A'!C5","CLICK HERE")
cText := ""
TEXT INTO cText
=HYPERLINK("[D:\\MyExcelFile.xlsx]'Sheet1 A'!C5","CLICK HERE")
ENDTEXT
#include "FiveWin.ch"
function Main()
local oExcel := CreateObject( "excel.application" )
local oBook := oExcel:Workbooks:Add()
local oSheet := oBook:Worksheets( 1 )
oSheet:Range( "A1" ):Value = "Last Name"
oSheet:Range( "B1" ):Value = "First Name"
oSheet:Range( "A1:B1" ):Font:Bold = .T.
oSheet:Range( "A2" ):Value = "Doe"
oSheet:Range( "B2" ):Value = "John"
oSheet:Range( "D4" ):Value:='=HYPERLINK("#Sheet1!A12","Test1")'
// insert correct full path for hyperlinked file
oSheet:Range( "A10" ):Value := '=HYPERLINK("[c:\Myfolder\Bookx.xls]Sheet1!C5","CLICK HERE")'
oSheet:Range( "A12" ):Value:='=HYPERLINK("#Sheet1!D4","Test2")'
oSheet:Range( "A13" ):Value:='=HYPERLINK("#Sheet2!E18","Test3")'
oBook:WorkSheets("Sheet2"):Range( "E18"):Value:='=HYPERLINK("#Sheet1!A13","Test4")'
// oBook:SaveAs( CurDrive() + ":\" + CurDir() + "\Book1x.xls" )
oExcel:Visible = .T.
// oExcel:Quit()
MsgInfo( "Demo Excel File Created" )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 86 guests