...

View Full Version : Converting excel data into simple xml format?



guermantes
12-11-2008, 12:10 PM
Hi,

I am building an image gallery that sources its images and thumbnails and titles etc from an xml file.

For keeping the data in an easily manageable format, and because we are many who will update the gallery and not everyone will be comfortable with editing an XML-file, I think it would be great to have the data in an Excel spreadsheet, with a column for the fullsized image name, another for the thumbnail and a third for the title, and so on.

But how could I get that data into an xml-formatted file that my image gallery would understand?

I tried saving in Excel as XML but it saved a very complex spreadsheet thing.

Look at the screenshot below, I want to just go from the top image to the bottom image. Does anyone know how I could achieve this? I guess a custom macro in Word could do it but I'd prefer to just export from Excel (I am thinking it has to be possible!).

http://i33.tinypic.com/s45iki.gif


Thanks a lot for any ideas!

/g

RichestBoy
12-11-2008, 01:36 PM
You can create some PHP script to convert Excel to XML.
I am not sure how to create but POST "Script to convert XLS to XML" on various forums. You will get readymade script.

guermantes
12-11-2008, 04:14 PM
Thanks for replying.

Sorry, I was not entirely clear. I am not looking to convert online/on the fly/in real time. I am looking for a pre-publishing solution. A bit like when we create an image in Photoshop and then optimize for the web and only upload the optimized image.

I guess I am actually asking how to export from Excel to my desired output format, but rather than posting in an Excel forum, I figured I would ask here since I presumed that many people would keep their data in speadsheets, and then convert that data to XML before putting it online, and thus would know exactly how to achieve my desired outcome.

oesxyl
12-11-2008, 07:44 PM
Thanks for replying.

Sorry, I was not entirely clear. I am not looking to convert online/on the fly/in real time. I am looking for a pre-publishing solution. A bit like when we create an image in Photoshop and then optimize for the web and only upload the optimized image.

I guess I am actually asking how to export from Excel to my desired output format, but rather than posting in an Excel forum, I figured I would ask here since I presumed that many people would keep their data in speadsheets, and then convert that data to XML before putting it online, and thus would know exactly how to achieve my desired outcome.
- post a sample with your excell converted to xml
- post another sample with xml for your output
- decide with what xslt processor want to use

to automate all this, see this link:

http://www.vex.net/~cthuang/tcom/

if you think that tcl/tk is not what you want, look for a vb or other way to do this.

regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum