drop local hyper link from excel

This commit is contained in:
Pavel 2024-09-19 10:48:25 +03:00
parent 8567060e1b
commit 736893b2aa

@ -252,11 +252,11 @@ func handleImage(file *excelize.File, sheet, cell, content string, count, row in
if err := file.SetCellValue(sheet, cell, linkText); err != nil { if err := file.SetCellValue(sheet, cell, linkText); err != nil {
fmt.Println(err.Error()) fmt.Println(err.Error())
} }
if err := file.SetCellHyperLink(sheet, cell, fmt.Sprintf("%s!A%d", mediaSheet, mediaRow), "Location", excelize.HyperlinkOpts{ //if err := file.SetCellHyperLink(sheet, cell, fmt.Sprintf("%s!A%d", mediaSheet, mediaRow), "Location", excelize.HyperlinkOpts{
Display: &linkText, // Display: &linkText,
}); err != nil { //}); err != nil {
fmt.Println(err.Error()) // fmt.Println(err.Error())
} //}
} }
} else { } else {
if len(content) > 1 && content[0] == '`' && content[len(content)-1] == '`' { if len(content) > 1 && content[0] == '`' && content[len(content)-1] == '`' {