Spreadsheet.ExportXML

This function exports a spreadsheet to the new XML file format.

Syntax Parameters Return Value
Function Spreadsheet.ExportXML( _
    FileName As String, _
    Optional FirstRow As Long = 1, _
    Optional LastRow As Long = 0, _
    Optional FirstColumn As Long = 1, _
    Optional LastColumn As Long = 0, _
    Optional UseTextLabels As Boolean = True, _
    Optional OverWriteFile As Boolean = True) As Boolean
  • FileName [in]

FilePath and/or FileName to where the exported .xml file will be saved. If a file path is not specified the .xml file will be save to the current working directory.

Type: String

  • FirstRow [in,optional]

The first row to be exported.

Type: Long

Default value: 1

  • LastRow [in,optional]

The last row to be exported. If 0 is used all rows that fall after the FirstRow specification will be exported.

Type: Long

Default value: 0

  • FirstColumn [in,optional]

The first column to be exported.

Type: Long

Default value: 1

  • LastColumn [in,optional]

The last column to be exported. If 0 is used all columns that fall after the FirstColumn specification will be exported..

Type: Long

Default value: 0

  • UseTextLabels [in,optional]

Type: Boolean

Default value: True

  • OverWriteFile [in,optional]

Type: Boolean

Default value: True

  • FirstRow [in,optional]

The first row to be exported.

Type: Long

Default value: 1

Boolean

SVB Example

Exporting a spreadsheet as XML:

Option Base 1
Option Explicit
Sub Main
    Dim spr As Spreadsheet
    'assigns the active spreadsheet to the object spr
    Set spr = ActiveSpreadsheet
    'exports the file Statistica.xml, starting at row 1,
    'column 1. The variable text labels are exported and if the file exists it will
    'be overwritten. 
    spr.ExportXML("C:\users\GabiM\Documents\Statistica.xml",1,0,1,0,True,True)
End Sub