$column = str_replace(',',' ', $rows[address]);
$column = addslashes($column);
$column = str_replace("\n", " ",$column);
$contents.= $column."\t";
$contents.="\n";
}
header("Content-type: application/ms-excel");
header("Content-Disposition: attachment; filename=Confirmed.xls");
print $contents;
如何在不替换“/ n”的情况下放置地址字段,因为它是一个地址字段,我希望以一种好的方式在单元格中显示它...替换“返回”使我的地址成为一行。
答案 0 :(得分:-1)
创建电子表格可能会遇到很多问题,当我遇到这样的问题时,我最终将地址字段拆分为多个列。我写了一篇关于这个很久以前的文章希望这有助于http://www.anchorx.com/ali/2011/02/27/create-spreadsheet-with-php/