Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.ExcelExport

Previous pageReturn to chapter overviewNext page

Description

Exports the file system branch of the currently selected directory to Excel.
 

Syntax

ExcelExport (ExportPath : <String>, SheetName : <String>, ExportFullBranch : <Boolean>, IncludeHeader : <Boolean>, IncludeUnit : <Boolean>, AppendToSheet : <Boolean>)
 

Parameters

ExportPath

The full path of the export file (including the exported file name).
You can use environment variables as well as "%DATE%" and "%TIME%" in the file path.

SheetName

The name of the new Excel sheet for the export. Use an empty string to name the new sheet by the current date including time.
You can use "%DATE%" and "%TIME%" as variables in the sheet name.

ExportFullBranch

Indicates, if the export will include the full directory branch or only expanded directories.

IncludeHeader

Indicates, if a header with general information about the root directory/drive will be included.

IncludeUnit

Indicates, if size units and thousand separator will be included in the export, or if sizes are exported as plain numbers.

AppendToSheet

Indicates, if the Excel export will be appended to an existing sheet with the same "SheetName".
If "SheetName" is an empty string this parameter is ignored.

 
Example

SOS.ExcelExport "C:\Temp\SOS\excelexport.xls", "TestSheet %DATE%", True, False, False, False

Produces an Excel file named "excelexport.xls" in the directory "C:\Temp\SOS\", containing a new sheet named "TestSheet <yyyy-mm-dd>". The full directory branch will be exported, without header or size unit information.
The target spreadsheet will be newly added, or an existing spreadsheet with the given title will be overwritten.
 

Remarks

The names of Excel sheets have to be unique in each Excel file. If a sheet with the name of the passed SheetName parameter already exists, and the parameter AppendToSheet is False, the new sheet will be named "<SheetName> (x)" (Where x is a number and "<SheetName> (x)" is unique in this Excel file).