Home > Language Reference > Excel Functions > CreateExcelFile

CreateExcelFile

The CreateExcelFile function creates an Excel worksheet.

Usage

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

Syntax

ret = CreateExcelFile(<Excel_filename>)

Parameters

<Excel_filename>, string, Excel filename to create.

Return value

ret, optional numeric return value. If the function succeeds, the return value is 0. If the function fails, the return value is a nonzero value (see File Functions Error Codes).

See also

CloseExcelCom
ExecExcelMacro
ReadExcel
WriteExcel


Example

var = CreateExcelFile("C:\wttest\my_Sheet_Excel.xlsx")