invantive documentation
Invantive Support ForumsLog In / Sign Up

excel

The Excel package enables generation of Excel workbooks.

add_worksheet: Add worksheet

Add a worksheet to an Excel workbook.

Parameters:

  • workbook (object, required): Reference to Excel workbook.
  • name (string, required): Valid name for Excel worksheet.

autofit_worksheet: Autofit the columns in a sheet

Autofit the columns in a sheet.

Parameters:

  • worksheet (object, required): Reference to Excel worksheet.

close: Close the workbook

Close the workbook.

Parameters:

  • workbook (object, required): Reference to Excel workbook.

export_to_xlsx: Export to XLSX

Export the current contents of an Excel workbook as an XLSX-file.

Parameters:

  • workbook (object, required): Reference to Excel workbook.

fill_using_query: Store query results in workbook

Store the output of a query in an Excel workbook.

Parameters:

  • worksheet (object, required): Reference to Excel workbook.
  • query (string, required): Invantive UniversalSQL query which returns intended contents.
  • addHeader (boolean, optional): Whether to add a header row. (default: True)
  • startPosition (string, optional): Intended top-left start position in Excel single cell notation. (default: A1)
  • dataRangeName (string, optional): Name of named range to create for the contents.

set_cell_contents: Set the contents of a cell

Set the contents of a cell.

Parameters:

  • worksheet (object, required): Reference to Excel worksheet.
  • cell (string, required): Name of Excel cell to assign value to.
  • value (object, optional): Value for cell.

set_worksheet_name: Set worksheet name

Set the worksheet's name.

Parameters:

  • worksheet (object, required): Reference to Excel worksheet.
  • name (string, required): Valid name for Excel worksheet.