Ok oto fragmęt kodu troche go uprościłem nawet bardzo dla wizualnego wglądu o co mi chodzi:
<?xml version="1.0" encoding="iso-8859-2"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="reply-to" content="Adres_e-mail" />
<meta name="generator" content="WebSite PRO 4.2" />
<meta name="author" content="Autor_dokumentu" />
<meta name="description" content="Opis" />
<title>Bez Tytułu</title>
</head>
<body>
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=oferta_$_GET[oferty].xls");
header("Pragma: no-cache");
header("Expires: 0");
include"includes/config.php";
$wyniksz = mysql_query("SELECT * FROM {$pr}ofertowanie WHERE id_oferty='$_GET[oferty]' ") OR die(mysql_error());
if ($rekordsz = mysql_fetch_array ($wyniksz)){
extract($rekordsz);
echo"$dane do arkusza 1";
echo"dane do arkusza 2";
}
?>
</body>
</html>
gdzie dane do arkusza 1 i dane do arkusza 2 właśńei chciał bym rozbić na arkusze