Skip to main content

Print a report 🖨️

Many of the libraries on ArupCompute produce report output. This can be accessed and printed using the ArupCompute Excel client.

Refer to the reference documentation for full details of the various report printing and manipulation functions.

warning

Report output options require much more data transfer between the ArupCompute servers and your computer. Ensure to only ask for report output when you really need it. For example if you have created a big table, only ask for the report to be printed for the most critical row. Guidance on how to implement this can be found in the 'only print when required' how-to guide.

Level 1 - Plain text report

Short reports can be printed directly to the cell by entering report into the Output argument.

For example to print the plain text report of the DesignCheck2 example calculation enter =DesignCheck2.Examples.SimpleCalculation_df6cc("Example",1,2,,"report")

excel-plain-text-report

Tips:

  • Ensure 'wrap text' is set to ensure lines break correctly
  • If the report is too large for a single cell you can merge multiple cells together

Watch-its:

  • Because of the limitations of Excel only plain text (no styling, typesetting, mathematics, graphs etc.) can be printed to the cell
  • Not all ArupCompute libraries create plain text reports
  • The maximum number of characters that can be contained in an Excel cell is 32,767 characters. This limit applies even if neighbouring cells are merged together - this puts a hard limit on the size of report that can be printed directly to the cell

Level 2 - HTML report

Because of the plain text limitations listed above the ArupCompute Excel plugin can save a HTML version of the report output to a file. This is the same report output that you see via the ArupCompute web interface, and so supports all sorts of nice typesetting features.

For example to print the plain text report of the DesignCheck2 example calculation enter:

=DesignCheck2.Examples.SimpleCalculation_df6cc("Example",1,2,,"report_HTML",ArupCompute.FileSystem.CurrentDirectory()&"\example.html")
tip

This makes use of the CurrentDirectory method to construct a relative file path - this makes sharing spreadsheets with colleagues easier.

Your Excel file will need to be saved for the CurrentDirectory function to work.

When the file has been printed the filepath to the document will appear in the cell. Navigating there you can open the file with any web browser.

excel-open-html-report

tip

HTML files are lightweight and can be viewed and rescaled to suit the readers device. In fact the UK government recommends HTML over PDF documents.

Level 3 - Convert HTML to PDF

There are some times where a PDF is needed though, and to do that the ArupCompute Excel plugin provides a utility method to enable this.

excel-convert-html-to-pdf

warning

The conversion of HTML documents to PDF is complicated and computationally intensive. To achieve this the ArupCompute Excel plugin sends the HTML file to an ArupCompute server where the conversion happens, and the resulting PDF gets sent back to your computer. Not only is this somewhat slow, it means that if you send many conversion requests at the same time you can overwhelm the server meaning others are not able to use it.

As such it is very important that you minimise the amount of PDF conversions you undertake. For example if you have created a large table of calculations only PDF the critical rows. Guidance on how to implement this can be found in the 'only print when required' how-to guide.