marcick Well-Known Member Licensed User Longtime User Mar 25, 2021 #1 Hi guys, anybody knows how can I add a HyperLink when writing to a cell with Excel library ?
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #2 This is the string I should write in the cell to obtain what I need, but writing it with Excel Library then I have the plain text as result and not the HyperLink. B4X: =HIPERLINK("www.google,it", "Google") Upvote 0
This is the string I should write in the cell to obtain what I need, but writing it with Excel Library then I have the plain text as result and not the HyperLink. B4X: =HIPERLINK("www.google,it", "Google")
DonManfred Expert Licensed User Longtime User Mar 26, 2021 #3 marcick said: =HIPERLINK Click to expand... Are you sure it is the correct command? Shouldn´t it be HYPERLINK(url, [optional name]) ? Away from that you should NOT use comma in a URL. Use DOT. Also you need to enter a complete http URL! B4X: HYPERLINK("http://www.google.it", "Google") works. Last edited: Mar 26, 2021 Upvote 0
marcick said: =HIPERLINK Click to expand... Are you sure it is the correct command? Shouldn´t it be HYPERLINK(url, [optional name]) ? Away from that you should NOT use comma in a URL. Use DOT. Also you need to enter a complete http URL! B4X: HYPERLINK("http://www.google.it", "Google") works.
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #4 Sorry for the mistake in the post, yes, HYPERLINK. But in the genereted Excel I read the string as plain text. If then (in Excel) I copy that string and paste in another cell, the result is correct, eg an Hyperlink. Upvote 0
Sorry for the mistake in the post, yes, HYPERLINK. But in the genereted Excel I read the string as plain text. If then (in Excel) I copy that string and paste in another cell, the result is correct, eg an Hyperlink.
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #5 DonManfred said: Away from that you should NOT use comma in a URL. Use DOT. Click to expand... Sorry again, two mistake writing the post. But I confirm the behaviour Upvote 0
DonManfred said: Away from that you should NOT use comma in a URL. Use DOT. Click to expand... Sorry again, two mistake writing the post. But I confirm the behaviour
DonManfred Expert Licensed User Longtime User Mar 26, 2021 #6 marcick said: But I confirm the behaviour Click to expand... Check post #3 again. I posted the solution Upvote 0
marcick said: But I confirm the behaviour Click to expand... Check post #3 again. I posted the solution
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #7 DonManfred said: B4X: HYPERLINK("http://www.google.it", "Google") works. Click to expand... Sorry: works where ? In Excel (of course) or writing a workbook with B4A and Excel library ? Upvote 0
DonManfred said: B4X: HYPERLINK("http://www.google.it", "Google") works. Click to expand... Sorry: works where ? In Excel (of course) or writing a workbook with B4A and Excel library ?
DonManfred Expert Licensed User Longtime User Mar 26, 2021 #8 marcick said: In Excel Click to expand... i tested in in excel It should work with excel library too. you need to add the correct formula to the cell. Upvote 0
marcick said: In Excel Click to expand... i tested in in excel It should work with excel library too. you need to add the correct formula to the cell.
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #9 DonManfred said: It should work with excel library too. you need to add the correct formula to the cell. Click to expand... No, it doesn't ..... in the genereted Excel I read the string as plain text. If then (in Excel) I copy that string and paste in another cell, the result is correct, eg an Hyperlink. Upvote 0
DonManfred said: It should work with excel library too. you need to add the correct formula to the cell. Click to expand... No, it doesn't ..... in the genereted Excel I read the string as plain text. If then (in Excel) I copy that string and paste in another cell, the result is correct, eg an Hyperlink.
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #11 B4X: Dim cell As WritableCell cell.InitializeText(6, Index,"=COLLEG.IPERTESTUALE(" & Chr(34) & "www.google.it" & Chr(34) & "," & Chr(34) & "Google" & Chr(34) & ")") cell.SetCellFormat(cf) Sheet1.AddCell(cell) (italian version of Excel) And this is the result. In cell H2 I have copied the contents of cell G2 and it has been translated to HyperLink Upvote 0
B4X: Dim cell As WritableCell cell.InitializeText(6, Index,"=COLLEG.IPERTESTUALE(" & Chr(34) & "www.google.it" & Chr(34) & "," & Chr(34) & "Google" & Chr(34) & ")") cell.SetCellFormat(cf) Sheet1.AddCell(cell) (italian version of Excel) And this is the result. In cell H2 I have copied the contents of cell G2 and it has been translated to HyperLink
angel_ Well-Known Member Licensed User Longtime User Mar 26, 2021 #12 Try this: B4X: cell.InitializeFormula(6, 1, "=HYPERLINK(""http://www.google.it"",""Google"")") Upvote 0
angel_ Well-Known Member Licensed User Longtime User Mar 26, 2021 #14 marcick said: View attachment 110463 Click to expand... What text appears in the cell? Upvote 0
E emexes Expert Licensed User Longtime User Mar 26, 2021 #16 marcick said: That one: "#N/D" Click to expand... What appears in the cell edit field when you press F2 in one of the column-G hyperlink formula cells? Upvote 0
marcick said: That one: "#N/D" Click to expand... What appears in the cell edit field when you press F2 in one of the column-G hyperlink formula cells?
marcick Well-Known Member Licensed User Longtime User Mar 26, 2021 #17 Pressing F2 I see it appears "hyperlink" in the formula box Upvote 0
E emexes Expert Licensed User Longtime User Mar 26, 2021 #18 marcick said: Pressing F2 I see it appears "hyperlink" in the formula box View attachment 110464 Click to expand... I'm more wondering why this bit isn't the HYPERLINK formula: edit: but I don't have Excel any more on any of my computers, so I can't try it for myself Upvote 0
marcick said: Pressing F2 I see it appears "hyperlink" in the formula box View attachment 110464 Click to expand... I'm more wondering why this bit isn't the HYPERLINK formula: edit: but I don't have Excel any more on any of my computers, so I can't try it for myself
DonManfred Expert Licensed User Longtime User Mar 26, 2021 #20 marcick said: I don't know .... Click to expand... YOU are adding this as a fomula in your Code! B4X: Dim cell As WritableCell cell.InitializeText(6, Index,"=COLLEG.IPERTESTUALE(" & Chr(34) & "www.google.it" & Chr(34) & "," & Chr(34) & "Google" & Chr(34) & ")") cell.SetCellFormat(cf) Sheet1.AddCell(cell) Add the correct formula!!! DO NOT USE GOOGLE TRANSLATE TO TRANSLATE CODE I´m out here. Upvote 0
marcick said: I don't know .... Click to expand... YOU are adding this as a fomula in your Code! B4X: Dim cell As WritableCell cell.InitializeText(6, Index,"=COLLEG.IPERTESTUALE(" & Chr(34) & "www.google.it" & Chr(34) & "," & Chr(34) & "Google" & Chr(34) & ")") cell.SetCellFormat(cf) Sheet1.AddCell(cell) Add the correct formula!!! DO NOT USE GOOGLE TRANSLATE TO TRANSLATE CODE I´m out here.