I'm using excel downloads as a way of users downloading a score sheet, filling out scores and then re-uploading this score sheet into the system.
Part of this requires the data in the database to be put into a CSV. Then its opened on the client computer.
The problem I'm having is that the CSV does not allow me to use any kind of formatting. This includes hiding cells, making text bold etc.
So parsing the data in and out of an excel format (xls) document would make more sense... But from what I've heard and read, this would be really difficult because of different excel versions etc etc.
I heard that XML is a good way of parsing data into an excel format. I wondered if anyone had any experience of this using php?
Is there a good script anyone has heard of? Does anyone have any comments on different versions of excel opening ir (or even, things like open office or lotus) What do you think if my best step forward?
Thanks very much for your help! Either reply or email me tom at candid sky dot com
Parsing The Excel File In PHP First step is to include the SimpleXLSX class into our parseXLSX. php script. Then, we can parse the file by calling the parse static method of the SimpleXLSX class with the path to our Excel file in parameter. This call returns an object represeing the data parsed from the Excel file.
If you run the XML file as a PHP script, then yes.
An XML Parser is a program that translates XML an XML document into a DOM tree-structure like document. CDATA is used to ignore special characters when parsing XML documents. PHP uses the simplexml_load_file to read XML documents and return the results as a numeric array. PHP DOMDocument class to create XML files.
Try out PHP Excel (not sure if both links are the same) and PHP Excel Reader.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With