Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

Scripts - Data blocks

The script can contain a data block with new spreadsheet data.

  • The data are included between <data> and </data> tags.

  • In this block, each line of text is copied to a row in the spreadsheet.

  • The first row of the data block contains the column headers.
  • Data columns are separated with spaces, a tab, a ";" character or the list separator character.

Note that multiple subsequent space characters are interpreted as one single delimiter only.

A text value that includes spaces should be placed in quotes.

You can have multiple <data> sections in one script.

The data are appended to the existing columns in the spreadsheet. You may want to use the clear data command to clear all existing spreadsheet data first.

Examples

<data>
Weight    Height
60        1.65
80        1.70
          2.00
64		  
</data> 
<data>
Weight;Height
60;1.65
80;1.70
;2.00
64
</data> 

Both examples result in:

Result of data block <DATA>.

If there is only one column header in the first row of the data block, all values will be placed in a single column in the spreadsheet.

The following data block will place all values in a single column "Weight" in the spreadsheet.

<data>
Weight 
60 81	75 
62  90 
</data> 

This results in:

Result of data block <DATA>.

See also