views:

86

answers:

2

I have a web page where a user can upload xls files. When he uploads a file, i want to automate converting the excel file to excel xml. I want to convert it to an xml file as i think it will be easy to handle the data. Is it possible to write my own php function to do that?

A: 

Let me see if I understand. You're going to read a XLS file, write it out as XLSX, then read in the XLSX?

Why not just deal with the XLS in the first place?

Ignacio Vazquez-Abrams
http://stackoverflow.com/questions/174446/how-to-automate-converting-excel-xls-files-to-excel-xml-fromatI have found this code. Can the same thing be done in PHP?
chupinette
I have to write a function of my own to read an excel file(.xls). There are several open source solutions to do that but I have to write my own file parser. Then I thought, why not try to convert the xls to an xml file which can be done by File-> Save as Excel Xml and then try to grab the data from the xml file which I can do. But in my application, the user will upload an excel file(.xls). That is why I want to automate converting an .xls file to .xml
chupinette
A: 

You can use "cz excel converter" to Excel to xml Format, and this tool supports command line interface, so you can call it from your application, you can get demo version and more information from http://www.convertzone.com/excel_converter/help.htm

It's folder watch function maybe can help you, this tool can watch source file folder and convert new uploading ms excel documents to text files automatically. While your user upload word documents to your website, then this folder watcher can automatically convert them into csv format.

If you need batch convert converts PDF, XLS, HTML, XML, MTH, CSV, TEXT, DBF, Lotus 1-2-3, WKS, WQ1, SLK, DIF and more, "cz excel converter" will help you, it can convert many excel xls files at one time.

Please note: To support XML and MHTML format, you must install MS Excel 2002 or above.

regards
flyaga

flyaga