Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_WORKSHEET > of_write

of_write() method

Write data to the cell

Syntax

worksheet.of_write ( row, col{, value}, format )

Parameters

RowThe unsigned integer whose value is the number of row
ColThe unsigned integer whose value is the number of column
Value (optional)The value to which you want to set the data at the specified location. The data type of the value must be: integer, long, double, decimal, string, blob (unicode string), datetime, date or time
FormatA reference to the n_xls_format object

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

The maximum string value size is 255 characters.

Examples

worksheet.of_write ( 0, 0, 123, format1 )	//write number to A1 cell
worksheet.of_write ( 0, 1, 'Hello world', format2)   //write string to B1 cell
worksheet.of_write ( 0, 2, today(), format3)            //write date to C1 cell