How to load a string instead of uploading a file?

Topics: Developer Forum
Jul 22, 2013 at 1:32 PM
is there any function which takes file contents as string instead of full file path
Jul 23, 2013 at 8:39 AM
If I understand the question correctly, you get the path to the file rather than its content?
In this case, I advise you a careful reading of this section of the documentation for php:

This note should be of particular interest to you:
Be sure your file upload form has attribute enctype="multipart/form-data" otherwise the file upload will not work.

But not limited you to this one point.
Jul 25, 2013 at 1:29 AM
I have the contents of xls file as string in any other variable in my program. question was does PHPExcel has any function which can take that string to load the new object of PHPExcel class? bcz the load( ) function in I/O class takes file path rather than contents of file
Jul 25, 2013 at 7:42 AM
No, not that I know of. However, if the file is in the xls format, it seems not difficult to make a version of the reader that handles the problem.
Look at the code of the read method of the PHPExcel_Shared_OLERead class