I am constructing a line graph on a GD image.Do you guys know of any way i can export it into excel such that its just like one created in excel

Put this code in top of your file. and display your image as you are displaying in HTML file. It will download as excel file as you want

$file_type = "vnd.ms-excel";
$file_name= "somename.xls";
header("Content-Type: application/$file_type");
header("Content-Disposition: attachment; filename=$file_name");
header("Pragma: no-cache");
header("Expires: 0");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.