3

How can I convert the array/json into an Excel file (Office Open XML)?

$result = mysql_query($query);
$rows = Array();
while($row = mysql_fetch_assoc($result)) {
    array_push($rows, $row);
}
echo json_encode(Array(
    "data" => $rows
));
1
  • 1
    There's not a magical convert_to_excel() function, but I believe there are a few libraries for this. Very worst case, the standard for Excel's file format has been published by MS. Commented Jun 26, 2012 at 9:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.