link how not to remove "#" #2385

Closed
opened 2021-09-13 12:35:39 +00:00 by zhangjingyu1024 · 3 comments
zhangjingyu1024 commented 2021-09-13 12:35:39 +00:00 (Migrated from github.com)

ws['A1'].l = { Target: 'http://1234.com/#/name=tom&age=23' };

Links with "#" will be removed, and the following parameters will be removed. How to make the URL complete with "#"? For example: http://1234.com/#/name=tom&age=23 , I need help!!

`ws['A1'].l = { Target: 'http://1234.com/#/name=tom&age=23' };` Links with "#" will be removed, and the following parameters will be removed. How to make the URL complete with "#"? For example: http://1234.com/#/name=tom&age=23 , I need help!!
SheetJSDev commented 2021-09-13 23:40:22 +00:00 (Migrated from github.com)

Cannot reproduce in 0.17.1. Run console.log(XLSX.version) and ensure you are on the latest version:

var wb = XLSX.utils.book_new();
var ws = XLSX.utils.aoa_to_sheet([["A1"]]);
ws['A1'].l = { Target: 'http://1234.com/#/name=tom&age=23' };
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
XLSX.writeFile(wb, "issue2385.xlsx")

https://jsfiddle.net/xonjyr8b/

This generates a file with cell A1 linking to "http://1234.com/#/name=tom&age=23". If you can share more details (what file format you are using?, are you somehow modifying the worksheet later?) we can reopen the issue.

Cannot reproduce in 0.17.1. Run `console.log(XLSX.version)` and ensure you are on the latest version: ```js var wb = XLSX.utils.book_new(); var ws = XLSX.utils.aoa_to_sheet([["A1"]]); ws['A1'].l = { Target: 'http://1234.com/#/name=tom&age=23' }; XLSX.utils.book_append_sheet(wb, ws, "Sheet1"); XLSX.writeFile(wb, "issue2385.xlsx") ``` https://jsfiddle.net/xonjyr8b/ This generates a file with cell A1 linking to "http://1234.com/#/name=tom&age=23". If you can share more details (what file format you are using?, are you somehow modifying the worksheet later?) we can reopen the issue.
zhangjingyu1024 commented 2021-09-24 03:22:30 +00:00 (Migrated from github.com)

In this way, the '#' in the xlsx file hyperlink has been removed. The XLS file has' # ', but will be converted to'% 23 'when jumping to the web page.The device is a Mac

In this way, the '#' in the xlsx file hyperlink has been removed. The XLS file has' # ', but will be converted to'% 23 'when jumping to the web page.The device is a Mac
SheetJSDev commented 2021-09-24 03:36:49 +00:00 (Migrated from github.com)

The XLSX file looks correct: issue2385-result.xlsx

Open the file in Excel, right-click the cell and Edit Hyperlink. Locally it looks like
issue2385-Edit-Hyperlink

The address appears to be correct.

The XLSX file looks correct: [issue2385-result.xlsx](https://github.com/SheetJS/sheetjs/files/7222118/issue2385-result.xlsx) Open the file in Excel, right-click the cell and Edit Hyperlink. Locally it looks like <img width="500" alt="issue2385-Edit-Hyperlink" src="https://user-images.githubusercontent.com/6070939/134614270-bbe779e5-3ea8-4848-918f-9df7fbd00b9d.png"> The address appears to be correct.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#2385
No description provided.