Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKBOOK_V97 > of_create

of_create() method

Creates new workbook with the file name you specify.

Syntax

Workbook.of_create ( filename )

Parameters

FilenameA string whose value is the name of the file you want to create. If filename is not on the operating system's search path, you must enter the fully qualified name

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If argument value is NULL, of_create returns NULL.

Examples

n_xls_workbook book5
book5 = create n_xls_workbook_v5    //Excel5
book5.of_create ( 'C:\DOC\MY_BOOK5.XLS' )     //create excel workbook

n_xls_workbook book97
book97 = create n_xls_workbook_v97    //Excel97
book97.of_create ( 'C:\DOC\MY_BOOK97.XLS' )     //create excel workbook