SpaceObServer.Application.ExcelExport

<< Zum Inhaltsverzeichnis >>

Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.ExcelExport

Description

Allows you to export any  SpaceObServer statistic (lists and charts) to an Excel file.
 

Syntax

ExcelExport (ExportPath : <String>, SheetName : <String>, ExportFullBranch : <Boolean>, IncludeHeader : <Boolean>, IncludeUnit : <Boolean>, AppendToSheet : <Boolean>, [optional]Statistics : <String>)
 

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 of the scantree, or if sizes are exported as plain numbers. Note: This parameter does not affect the export of any list except the scantree.

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.

Statistics

(Optional Parameter) A semicolon separated list of charts and lists, which should be included in the Excel export.
The table of the Export Statistics lists all accessible types of charts and lists.

Note: If this parameter is not set, the directory tree will be exported (default).

 
Example

$SOS.ExcelExport("C:\Temp\SOS\ExcelExport.xlsx", "TestSheet %DATE%", $true, $true, $false, $false, "scantree; detailslist; piechart; historychart") #PowerShell

SOS.ExcelExport "C:\Temp\SOS\ExcelExport.xlsx", "TestSheet %DATE%", True, true, False, False, "scantree; detailslist; piechart; historychart" 'VBS

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, including a header, no size unit information.
An existing spreadsheet with the given title will be overwritten. The directory tree, the details list, the pie chart and the history chart of the current root will be included in the Excel file on separate sheets.
 

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).