$worksheet1->set_row(1, 20); $worksheet1->write_string(1, 1, "This worksheet's name is " . $worksheet1->get_name()); $worksheet1->write(2, 1, "http://www.phpclasses.org/browse.html/package/767.html"); $worksheet1->write_number(3, 0, 11); $worksheet1->write_number(3, 1, 1); $worksheet1->write_string(3, 2, "by four is"); $worksheet1->write_formula(3, 3, "=A4 * (2 + 2)"); //$worksheet1->write_formula(3, 3, "= SUM(A4:B4)"); $worksheet1->write(5, 4, "= POWER(2,3)"); $worksheet1->write(4, 4, "= SUM(5, 5, 5)"); //$worksheet1->write_formula(4, 4, "= LN(2.71428)"); //$worksheet1->write_formula(5, 4, "= SIN(PI()/2)"); // Creating the second worksheet $worksheet2 =& $workbook->add_worksheet(); // Format for the headings $formatot =& $workbook->add_format(); $formatot->set_size(10); $formatot->set_align('center'); $formatot->set_color('white'); $formatot->set_pattern(); $formatot->set_fg_color('magenta'); $worksheet2->set_column(0, 0, 15); $worksheet2->set_column(1, 2, 30); $worksheet2->set_column(3, 3, 15); $worksheet2->set_column(4, 4, 10); $worksheet2->write_string(1, 0, "Id", $formatot); $worksheet2->write_string(1, 1, "Name", $formatot); $worksheet2->write_string(1, 2, "Adress", $formatot); $worksheet2->write_string(1, 3, "Phone Number", $formatot); $worksheet2->write_string(1, 4, "Salary", $formatot); $worksheet2->write(3, 0, "22222222-2");