SendResultsSummaryToExcel

Sends summary of numerical results (of the first graphics window of the document) to Excel.

Syntax

SendResultsSummaryToExcel(doc, fileName, worksheetName, useFirstEmptyRow, cellName, includeHeader, includeFileName)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document

fileName

string

Excel file path

worksheetName

string

Excel worksheet name

useFirstEmptyRow

number

If 1, NeuroExplorer will ignore cellName parameter and add the results to the first row where the cell in column A is empty. If 2, NeuroExplorer will ignore cellName parameter and add the results to the first column where the cell in row 1 is empty. If 0, NeuroExplorer will paste data starting with the cell specified in cellName.

cellName

string

Excel cell where to paste the results. Should be in the form CR where C is Excel column name, R is the row number. For example, A1 is the top-left cell in the worksheet.

includeHeader

number

If 1, will paste column names

includeFileName

number

If 1, will add a column with the data file name

Return

None.

Note

See Specifying Windows file paths in Python for details on specifying file paths with backslashes in Python.

Examples

Python

import nex
doc = nex.GetActiveDocument()
nex.ApplyTemplate(doc, "Autocorrelograms")
nex.SendResultsSummaryToExcel(doc, "C:\\Data\\res.xlsx", "FromNex", 0, "A1", 1, 0)

NexScript

doc = GetActiveDocument()
ApplyTemplate(doc, "Autocorrelograms")
SendResultsSummaryToExcel(doc, "C:\Data\res.xlsx", "FromNex", 0, "A1", 1, 0)