PHPEXCEL exports a Chinese name image. this time, I really want to be a master, and I am very generous.

Source: Internet
Author: User
Tags echo name
PHPEXCEL is used to export Chinese name Images. this time, you can export them in English, but Chinese names cannot be exported. at the beginning, utf was converted to gbk by processing the encoding, so that phpexcel could find the image file and export it, but not. please help export images with Chinese names. because of special requirements, you cannot name them in English. please be a good expert. it's very urgent-PHPEXCEL exports Chinese name Images. this time I really want to be a good expert and I am very generous to you.
English can be exported, but Chinese names cannot be exported. at the beginning, utf was converted to gbk by processing the encoding, so that phpexcel could find the image file and export it, but not. please help export images with Chinese names. because of special requirements, you cannot name them in English. hurry up!
------ Best solution --------------------
According to the test, no Chinese image names are supported in PHPExcel.
------ Other solutions --------------------
Is the echo name Chinese?
------ Other solutions --------------------
No, right ??? My project uses UTF-8 in a unified manner, but file_exists () of the exported image in phpexcel cannot find the image in the path I wrote, but I had to convert it to the path of gbk and can find it, but the import fails. an error is returned. Can you post your export code on the second floor?
------ Other solutions --------------------
Reference:
No, right ??? My project uses UTF-8 in a unified manner, but file_exists () of the exported image in phpexcel cannot find the image in the path I wrote, but I had to convert it to the path of gbk and can find it, but the import fails. an error is returned. Can you post your export code on the second floor?
Didn't you test the code last time? You can change the image name to Chinese.
------ Other solutions --------------------
Hmm? My code is like this path, but it is an error code: $ objDrawing = new PHPExcel_Worksheet_Drawing ();
$ ObjDrawing-> setName ('photo ');
$ ObjDrawing-> setDescription ('image inserted by pyxjm ');
$ Imgpath = $ arrpath [0]. '\\'. $ arrpath [1]. '\\'. $ arrpath [2]. '\\'. $ arrpath [3]. '\ Public \ projects \ mj \ images \ logo \\'. $ value;
$ ObjDrawing-> setPath (iconv ('utf-8', 'gbk', $ imgpath ));
$ ObjDrawing-> setWidth ('25pt ');
$ ObjDrawing-> setHeight ('20pt ');
$ ObjDrawing-> setOffsetX (2 );
$ ObjDrawing-> getShadow ()-> setVisible (true );
$ ObjDrawing-> setCoordinates ($ array [$ k]. $ d );
// $ ObjDrawing-> setMimeType (PHPExcel_Worksheet_MemoryDrawing: MIMETYPE_DEFAULT );
$ ObjDrawing-> setWorksheet ($ objExcel-> getActiveSheet ());
Image path: D: \ wamp \ www \ jusaas \ Public \ projects \ mj \ images \ logo \ CERNET .jpg

It's hard for me to help me find out what I need and what I want to do. it's okay if I can't solve it.
------ Other solutions --------------------
Where did your $ arrpath come from? Is the content correctly sent?

------ Other solutions --------------------
$ Arrpath is the path to $ imgpath = D: \ wamp \ www \ jusaas \ Public \ projects \ mj \ images \ logo \ Cernet. JPG the correct content of this code can be exported by replacing the Chinese name with the English name.
------ Other solutions --------------------
I know that $ arrpath is a path. Where does it come from?
Is it entered in the program?

You
Echo base64_encode (print_r ($ arrpath, 1 ));
Paste the result to see
------ Other solutions --------------------
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =
[2012-11-19T17: 21: 31 + 08: 00] ERR: QXJyYXkKKAogICAgWzBdID0 + signature + IHd3dwogICAgWzNdID0 + IGp1c2FhcwopCg =

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.