westonganger/spreadsheet_architect

Add support for hyperlinks

westonganger opened this issue · 9 comments

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

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.

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.

@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.

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!

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.

@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?

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

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