thinkphp exporting Excel tables, you can already export the table.

Source: Internet
Author: User
thinkphp Export the Excel table problem, already can export the table.
thinkphp Export the Excel table problem, already can export the table. But because the exported table has time, it cannot be fully displayed, how to change the style of the resulting table? Width? No place to find settings


------Solution--------------------
Your columns are identified by a "\ T" (tab), you actually output CSV format data
In fact, Excel can accept documents in a variety of formats, naturally including HTML
Use HTML tables to tag table, TR, TD, TH and CSS to produce the perfect form (no pictures, of course).
------Solution--------------------
Like yours.
$title = implode ("\ T", $title);
echo "$title \ n";
You can write.
$title = Implode ("", $title);
echo "$title \ n";

And, of course, there's And


------Solution--------------------
1. Adjust the style to consider adding HTML tags to the cell
2. Adjust the width to control the width of Excel when exporting. Please refer to http://www.thinkphp.cn/topic/3739.html
  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.