Home » excel » Parsing Excel XML with PHP

Parsing Excel XML with PHP

Posted by: admin March 9, 2020 Leave a comment

Questions:

INTRODUCTION

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.

PROBLEM

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.

QUESTION

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

How to&Answers:

Try out PHP Excel (not sure if both links are the same) and PHP Excel Reader.

Answer:

I’m sure there are, for example, Perl modules which would help with XML, but consider also that an HTML table: <tr>, <td>, <th> tags will be opened by Excel and at least some of the formatting will translate to Excel

you just have to name it … something.xls