CreateExcelFile

File management function.

The CreateExcelFile function creates an Excel worksheet.

Usage

Mainly used to create an Excel file before you populate it using WriteExcel function.

Syntax

CreateExcelFile(<filename>)
or
ret=CreateExcelFile(<filename>)

Parameters

<filename>, string, name of the Excel file to be created. If the file already exists, it is deleted and recreated.

Return value

Ret, numeric return code. When the Excel file is created successfully, the function returns 0, otherwise use this return code for Error Handling.

Example

 

var = CreateExcelFile("C:\my_Sheet_Excel.xls")