SendResultsToExcel

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

Syntax

SendResultsToExcel(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 copy the data starting with the cell specified in cellName.

cellName

string

Excel cell where to copy 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, NeuroExplorer will paste column names.

includeFileName

number

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

Return

None.

Examples

Python

import nex
doc = nex.GetActiveDocument()
nex.ApplyTemplate(doc, "Autocorrelograms")
nex.SendResultsToExcel(doc, "C:\\Data\\NexResults.xlsx", "Nex", 0, "A1", 1, 0)

NexScript

doc = GetActiveDocument()
ApplyTemplate(doc, "Autocorrelograms")
SendResultsToExcel(doc, "C:\Data\NexResults.xlsx", "Nex", 0, "A1", 1, 0)