简体   繁体   中英

Parsing Excel XML with PHP

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

试用PHP Excel (不确定两个链接是否相同)和PHP Excel Reader

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM