search

Home  >  Q&A  >  body text

PHPExcel export

This is the code written:

1528460667281356.jpg

The final result does not generate a table and download it, only garbled characters appear on the console. I don’t know the reason? Asking God for advice?

S丶轩丶SS丶轩丶S2407 days ago1335

reply all(5)I'll reply

  • 力挽狂澜

    力挽狂澜2018-06-10 09:05:05

    Confirm whether the two libraries imported by the vendor are loaded. In addition, this process is encapsulated. Most scenarios are to export a two-dimensional associative array to excel. Logically speaking, the parameters only need a two-dimensional array [must] and some of your own custom parameters. config configuration array parameters [optional] There may be table title, author time, etc.

    reply
    0
  • 无忌哥哥

    无忌哥哥2018-06-09 09:03:15

    Let’s take a look at what specific error message the console reports.

    reply
    0
  • S丶轩丶S

    It's a bunch of letters. You can't add pictures in the reply area. There are no pictures. It was originally a bunch of garbled characters. After I added ob_end_clean(), it turned into a bunch of letters. It should be encoding. These things always appear, but no substance is generated. Excel table. A bunch of letters look like this: 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAOwADAP7/CQAGAAAAAAAAAAAAAAAAABAAAABQAAAAAAAAAAEAAAAAAAAAEAAAD+////AAAAAAYAAAD////

    S丶轩丶S · 2018-06-09 09:14:24
    无忌哥哥

    There are two imported external files in this code. Are you sure the import was successful?

    无忌哥哥 · 2018-06-09 09:47:52
    S丶轩丶S

    Yes, I always look for files according to the path, otherwise I will get the error that there is no PHPExcel.

    S丶轩丶S · 2018-06-09 10:03:10
  • Cancelreply