Search and Highlight Feature #3031

Closed
opened 2023-11-22 09:55:16 +00:00 by manik-ushur · 5 comments

Do we have a search feature within this library? Like, if I want to search for specific text and highlight that. Is that supported?
Also, do we have a feature to go to a specific cell?

Do we have a search feature within this library? Like, if I want to search for specific text and highlight that. Is that supported? Also, do we have a feature to go to a specific cell?
Owner

Both described features are out of scope. Typically UI libraries provide "highlight" and "go to cell" -- the main focal point of SheetJS CE is processing file data. If there is a specific UI tool in mind, please comment and a teammate can investigate.

Both described features are out of scope. Typically UI libraries provide "highlight" and "go to cell" -- the main focal point of SheetJS CE is processing file data. If there is a specific UI tool in mind, please comment and a teammate can investigate.
Author

Thanks @sheetjs. We are using @react-pdf-viewer/search @react-pdf-viewer/highlight with PDF. If we have similar features with Excel here, it will be really helpful.

Thanks @sheetjs. We are using @react-pdf-viewer/search @react-pdf-viewer/highlight with PDF. If we have similar features with Excel here, it will be really helpful.
Owner

The "here" part is unclear. Are you asking for:

A) "Add some sort of 'highlight' option to sheet_to_html and friends": That's doable but it seems like a highly niche feature since one search result would be hardcoded into the HTML

B) "Add search and highlighting to the web browser": This is already a feature of modern browsers.

C) "Add search and highlighting to a data grid": That would have to be supplied by the UI tool. If there is a specific tool you have in mind, let us know and we can investigate further.

The "here" part is unclear. Are you asking for: A) "Add some sort of 'highlight' option to [`sheet_to_html`](https://docs.sheetjs.com/docs/api/utilities/html#html-table-output) and friends": That's doable but it seems like a highly niche feature since one search result would be hardcoded into the HTML B) "Add search and highlighting to the web browser": This is already a feature of modern browsers. C) "Add search and highlighting to a [data grid](https://docs.sheetjs.com/docs/demos/grid/)": That would have to be supplied by the UI tool. If there is a specific tool you have in mind, let us know and we can investigate further.
Author

The "here" part is unclear. Are you asking for:

A) "Add some sort of 'highlight' option to sheet_to_html and friends": That's doable but it seems like a highly niche feature since one search result would be hardcoded into the HTML

B) "Add search and highlighting to the web browser": This is already a feature of modern browsers.

C) "Add search and highlighting to a data grid": That would have to be supplied by the UI tool. If there is a specific tool you have in mind, let us know and we can investigate further.

I have a use case something like this: I am extracting some data from the spreadsheet using some llms.
I show those extracted fields in a side form on the webpage and on other side i show the source worksheet.
I want user to click on the extracted field value and help the user to locate that field on the sheet. I am doing it in PDF using @react-pdf-viewer/search @react-pdf-viewer/highlight packages.

Want to know if we can do something to make this work in sheetjs.

> The "here" part is unclear. Are you asking for: > > A) "Add some sort of 'highlight' option to [`sheet_to_html`](https://docs.sheetjs.com/docs/api/utilities/html#html-table-output) and friends": That's doable but it seems like a highly niche feature since one search result would be hardcoded into the HTML > > B) "Add search and highlighting to the web browser": This is already a feature of modern browsers. > > C) "Add search and highlighting to a [data grid](https://docs.sheetjs.com/docs/demos/grid/)": That would have to be supplied by the UI tool. If there is a specific tool you have in mind, let us know and we can investigate further. I have a use case something like this: I am extracting some data from the spreadsheet using some llms. I show those extracted fields in a side form on the webpage and on other side i show the source worksheet. I want user to click on the extracted field value and help the user to locate that field on the sheet. I am doing it in PDF using @react-pdf-viewer/search @react-pdf-viewer/highlight packages. Want to know if we can do something to make this work in sheetjs.
Owner

If you are using a standard HTML table, you can use window.find . If you are using a separate UI component, see if they implemented search and highlight

If you are using a standard HTML table, you can use [`window.find`](https://developer.mozilla.org/en-US/docs/Web/API/Window/find) . If you are using a separate UI component, see if they implemented search and highlight
Sign in to join this conversation.
No Milestone
No Assignees
2 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#3031
No description provided.