Skip to main content

Generating Tables

MecSimCalc provides a flexible platform allowing the developer to generate tables in a variety of ways:

  1. The output editor allows for html tags and a developer familiar with html tables can use this functionality to design a table in the output step.
  2. A developer can choose to generate the table using a utility function in the code step that generates the required html string. For example, the following utility function from the mecsimcalc library msc.print_table() generates the required html table based on an input array of the table columns and an array of the column headers:
  3. A developer can use one of the many Python libraries that can output a html table directly. For example, the popular Pandas library, which is available on MecSimCalc has the built-in functionality of converting Pandas tables to html.

In the next example, we will show how an html table can be generated using both mecsimcalc library and the Pandas library.