Developer's reference DW2XLS for PowerBuilder

Reference > n_dwr_service_excel > of_create_wb

of_create_wb() method

Creates new workbook with the file name you specify.

Syntax

of_create_wb ( filename, parm)

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
parmA reference to the n_dwr_service_parm object which contain a set of parameters for process of converting

Return value

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

Examples

n_dwr_service_parm lnvo_parm
n_dwr_service_excel lnvo_excel

lnvo_excel = create n_dwr_service_excel 

lnvo_parm = create n_dwr_service_parm
lnvo_parm.ib_show_progress = true
lnvo_parm.is_version = '97'
lnvo_parm.ib_group_header = true

//Create Workbook
if lnvo_excel.of_create_wb('C:\MY_BOOK.XLS', lnvo_parm) = 1 then
	
	...
	//Close Workbook
	lnvo_excel.of_close_wb()
end if