qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. list_to_excel  (  *args ,  save=None ,  delimiter='\t' ,  header='' ,  align='top'  )[source]

Print or save iterables as columns in an Excel-compatible format.

Parameters:
argsscalar_nd

1- or 2-dimensional iterables to print or save in an Excel-compatible format.

savestr | None

The filepath, either absolute or relative to the working directory. If None, the output is printed.

delimiterstr

The delimiter between two columns.

headerstr

A header above the content of the output.

alignstr

How to align the columns that are smaller than the largest column. Can be either "top" or "bottom". Any other value is treated as "top".

Returns:
sstr

The formatted str.

Raises:
ValueError

If any argument is not 1- or 2-dimensional.