Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hyperlinks #36

Closed
westonganger opened this issue May 27, 2021 · 9 comments
Closed

Add support for hyperlinks #36

westonganger opened this issue May 27, 2021 · 9 comments

Comments

@westonganger
Copy link
Owner

Would be nice if we could support hyperlinks

https://github.com/caxlsx/caxlsx/blob/master/examples/hyperlink_example.md

@teddy1004
Copy link

Hi @westonganger , do we have the support for hyperlinks now? I checked the doc and code, seems I can not find it.

@westonganger
Copy link
Owner Author

No there isnt currently support for hyperlinks.

Best way for the Spreadsheet Architect API would be to implement it as a column type, however this would not support any custom text to show rather than the URL.

For XLSX: The axlsx docs above sort of elude to custom text support with the "Next Sheet" hyperlink however its not obvious to me how that works.

For ODS: We can use https://github.com/westonganger/rodf/blob/270f4ebbc401b9cfc282bc465fe54eaee0d04e63/spec/cell_spec.rb#L80 rodf does support the custom text however not sure how we would make SpreadsheetArchitect utilize this. May just have to compromise on no custom text we will see.

@westonganger westonganger reopened this Aug 29, 2022
@westonganger
Copy link
Owner Author

westonganger commented Aug 29, 2022

Discussing Axlsx custom text capabilities in caxlsx/caxlsx#160

For SpreadsheetArchitect we will not utilize custom text since the API for spreadsheet architect doesnt support it in an intuitive manner.

@westonganger
Copy link
Owner Author

@teddy1004 we now support hyperlinks for XLSX and ODS. If you pull the master branch then you should be able to test this feature, would love to get your feedback.

@teddy1004
Copy link

thanks @westonganger ! really appreciate your hard work, I'd like to test it out, but I don't know how should I use it? will it parse the URL in the text automatically or do I need to configure it manually? can you please give me more guides on this? huge thanks!

@westonganger
Copy link
Owner Author

westonganger commented Sep 30, 2022

You could follow the example spec from the PR

describe "hyperlinks" do

That should be enough to get you going. Shouldnt need any manual configuration other than setting the column type.

@teddy1004
Copy link

@westonganger thank you so much! I tried with URLs and it works! but I also got columns that have both string and hyperlinks, seems there's no way to do so, right?

@westonganger
Copy link
Owner Author

@teddy1004 I have created the following issue #50 to implement the ability to dynamically set the column type

@westonganger
Copy link
Owner Author

I've now merged #51 to master to allow dynamically setting the column type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants