When you export an Excel table, it is originally a field, and the first time you export it to the second line
Source: Internet
Author: User
When you export an Excel table, it is originally a field, and when you export it comes to the second line
Start Export
Header ("Content-type:application/vnd.ms-excel");
Header ("Content-disposition:attachment;filename=xueyuan_list_data.xls");
Since the data Beizhu at the time of submission is textarea, so beizhu this field will contain a newline character, when exported, once the content has a newline, then the second line will be displayed to the Excel table in another row, But what I want is beizhu. All the content in this field is only displayed in the "Remarks" box in the Excel table, what should I do?
------to solve the idea----------------------
Tested without replacing the carriage return line
Just wrap the output string in double quotes.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.