Today in the export Excel function, because the data to be exported is very large, so do not use phpexcel, but use the way of dynamic generation of file streams to export, encountered a problem, how to set a cell value as a hyperlink it.
The code for setting the cell's value is as follows:
The original idea is to see if you can find a similar code from the Phpexcel reference, find a half-day did not find, and then search engine searches the keyword "Data ss:type", found that the content is "<data ss:type=" String ">" Related, There is nothing I want, I can only find it again.
This is, I found an article:
This is to say that Excel is an XML file, I think, can be in XML format to open the Excel file, to see how the value of the hyperlink format is set.
This article says it can be seen with utraedit, but I can't see the contents of Excel in XML format with Utraedit.
Later I found that I could save the Excel file as an XML file.
Then open with notepad++, you can see the contents of the XML format.
Copy this format, you can set the hyperlink, the code is as follows:
Solve the problem of setting hyperlinks when PHP exports large amounts of data