statistikZH / statR

ZH-color-scheme & theme_stat template for ggplot2.
https://statistikzh.github.io/statR/
GNU General Public License v3.0
15 stars 1 forks source link

datasetsXLSX: Hyperlinks on Index Page seem to be broken #39

Closed ruizcrp closed 7 months ago

ruizcrp commented 2 years ago

Hi, when using the datasetsXLSX function, the hyperlinks on the index page seem to be broken. They look like this:

=HYPERLINK("#'Alle Angebote'!A1", "Kostenübersicht aller Angebotsnutzungen für Gemeinde Dielsdorf")

grafik

ruizcrp commented 2 years ago

grafik

ruizcrp commented 2 years ago

When looking at wb-object grafik

ruizcrp commented 2 years ago

I Think there are two issues. 1) The function openxlsx::makeHyperlinkString generates a HYPERLINK with a comma (as in ENglish Excel) as opposed to semicolon (as in German Excel) for the separation wthin a formula. 2) However, the main issue seems to be the conversion of the string. It happens within openxlsx::writeFormula. I also tried to replace openxlsx::makeHyperlinkString with a manual string, but the encoding was the same.

ThomasKnecht commented 2 years ago

How should the string for the hyperlink look like in the end?

ruizcrp commented 2 years ago

I think the following is the closes to what we need: =HYPERLINK("#'Alle Angebote'!A1", "Kostenübersicht aller Angebotsnutzungen für Gemeinde Dielsdorf")

However, not sure about the comma, as in the German Excel this would be a semicolon (however, maybe it is saved with a comma)

ThomasKnecht commented 2 years ago

the example seems to work

do you have a reprex where it does not work?

Thomas-Caspar-Fischer commented 7 months ago

Closing, as hyperlinks are currently working (based on makeHyperlinkString and writeFormula from the openxlsx package).