Кемеровские программисты php общаются здесь
-
Anonymous
Экспорт данных MySQL в Excel, разделенный запятой
Сообщение
Anonymous »
У меня есть этот код:
Код: Выделить всё
$sql = "SELECT ...
FROM ...
WHERE ...;
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password);
$Db = @mysql_select_db($DB_DBName, $Connect);
$result = @mysql_query($sql,$Connect);
$file_ending = "xls";
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=$filename.xls");
header("Pragma: no-cache");
header("Expires: 0");
$sep = "\t"; //tabbed character
while($row = mysql_fetch_row($result))
{
$schema_insert = "";
for($j=0; $j
Подробнее здесь: [url]https://stackoverflow.com/questions/47604842/exporting-mysql-data-into-excel-broken-by-comma[/url]
1726457553
Anonymous
У меня есть этот код:
[code]$sql = "SELECT ...
FROM ...
WHERE ...;
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password);
$Db = @mysql_select_db($DB_DBName, $Connect);
$result = @mysql_query($sql,$Connect);
$file_ending = "xls";
header("Content-Type: application/xls");
header("Content-Disposition: attachment; filename=$filename.xls");
header("Pragma: no-cache");
header("Expires: 0");
$sep = "\t"; //tabbed character
while($row = mysql_fetch_row($result))
{
$schema_insert = "";
for($j=0; $j
Подробнее здесь: [url]https://stackoverflow.com/questions/47604842/exporting-mysql-data-into-excel-broken-by-comma[/url]