writeToExcel

fun writeToExcel(map: Map<String, Double>, sheetName: String, wbName: String = sheetName, wbDirectory: Path = KSL.excelDir, header: Boolean = false)

Writes each entry in the map to an Excel workbook. The mapping of problematic double values is as follows:

  • Double.NaN is written as the string "NaN"

  • Double.POSITIVE_INFINITY is written as a string "+Infinity"

  • Double.NEGATIVE_INFINITY is written as a string "-Infinity"

Note that NULL is not a possible value in the map.

Parameters

sheetName

the name of the sheet within the workbook. This should follow the sheet naming conventions of Excel

map

the map of information to export

wbName

the name of the workbook. By default, assumes that the workbook name is the same as the sheet name.

wbDirectory

the directory to store the workbook. By default, this is KSL.excelDir.

header

if true a header of (Element Name, Element Value) is the first row in the sheet. By default, no header is written.