Hi I want to include an Excel Spreadsheet in my pdf and html output. What is the best way to acheive this?
Thank you for your help
Yes and no!
Yes you can link to it but the browser will then ask if you want to open it or save it. Obviously the end user will need either Excel or an app that can read the file.
Your solution looks about the best but you can also save the file as a PDF when it will open in a PDF reader.
See www.grainge.org for free Authoring and RoboHelp Information
Thank you Peter!
I've used that datatables scripting library in a Classic project before. It should be easier to implement in New UI given the better support for multiple stylesheets and web standards.
Cool. Thanks for sharing this, @Amebr. Looks nice and seems to be easy to implement.
However, as Peter already mentioned PDF output: Such a solution is great if the output is “web-only.” However, if PDF output is a requirement, it will not help. That is, it's worth investigating to use conditionals, and publish a “full” table to PDF, and an “interactive” table to web. Maybe by inserting the table twice and conditionalize them (and give them different IDs, so that DataTables does not process the full one).
Alternatively, conditionalize the DataTable link and script elements? Here it is to be tested whether RoboHelp also processes conditionalized link and script elements during output generation. If this is the case, the “interactivization” of the tables would only take effect during the generation of the web output, but not during the PDF generation – which would have the advantage that the tables do not have to be stored (and maintained) twice in the document. @Vivek Kumar, thoughts?
@Peter Grainge: Might be also a nice one for your website. Advanced table filtering, sorting, and breaking down of big tables are a useful thing to improve the experience.
How do you get sortable tables in PDF? It's not something I've ever come across, I admit.
And why would you need two tables in the source?
@Amebr: My idea was to insert the same table twice, with different IDs. DataTable only processes the tables with the IDs that you define. Hence the idea to have one table with an ID to give to DataTable, and one with an different ID. Both tables get a condition, one for online, one for print.
<table id="myData-online" data-condition="Platform:Online"> (...) </table> <table id="myData-Print" data-condition="Platform:Online"> (same content as in table above) </table>
This way, you can publisht the first table to only the weboutput (and let it become interactive with DataTabels there, and publish the other table to PDF.
Does that make sense?
Hmm … 🤔
It's eithr Friday or late, so you're forgiven. 😛
Thank you Amebr! That looks really good.
Joannah, Stefan is right that the datatables library will only get you sortable tables in the web-based outputs, not in PDF.
It also don't believe it will allow you to sort the tables within the Robohelp editor. Although I haven't tried this in New UI, so I could be wrong.
Thank you very much for all your help with this. So, this is a spreadsheet that is being constantly updated and needs to be included in the documentation for end users. What I need to be able to do is reference this spreadsheet somehow so that when I build the pdf and html output, I always get the latest version of this spreadsheet. I don't want to be copying and pasting the spreadsheet into a topic. Would I be able to do that?
In that case, the best is, to just upload the excel sheet to the server where the help is hosted, and then just reference it. That is, just add a link to the URL of the Excel sheet.
<p><a href="https://www.foo.com/link/to/your/excelscheet.xslx" target="_blank">Download the Excel Sheet here</a></p>