Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-20 Thread Ryan Engel
Welker [mailto:wel...@ucmo.edu] Sent: Monday, June 16, 2014 2:32 PM To: Code for Libraries Subject: RE: [CODE4LIB] Excel to XML (for a Drupal Feeds import) This should be quite doable in most programming languages with out-of-the-box tools and no tricky parsing code. The gist is to save in Excel

Re: [CODE4LIB] Excel to XML

2014-06-16 Thread Chris Gray
I'd do it with a Python script, but a Google search for csv to xml tool presents many hits. The top hit is a free online CSV to XML Converter at freeformatter.com. So export to CSV and away you go. http://www.freeformatter.com/csv-to-xml-converter.html Chris On 14-06-14 08:41 AM, Amelia

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Ryan Engel
Thanks for the responses, on the list and off, so far. As I'm sure is true for so many of us, my interest in learning more about how to solve this type of problem is balanced against my need to just get the project done so I can move on to other things. One of the great things about this

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Kyle Banerjee
I'd just do this the old fashioned way. Awk is great for problems like this. For example, if your file is tab delimited, the following should work awk '{FS=\t}{if ($2 != ) question = $2;}{print $1,question,$3}'' yourfile In the example above, I just print the fields but you could easily encase

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Adam Doan
Doan Research Enterprise and Scholarly Communication University of Guelph Library 519.824.4120 x52974 do...@uoguelph.ca - Original Message - From: Ryan Engel rten...@wisc.edu To: CODE4LIB@LISTSERV.ND.EDU Sent: Monday, June 16, 2014 12:29:53 PM Subject: Re: [CODE4LIB] Excel to XML

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Joshua Welker
@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import) I'd just do this the old fashioned way. Awk is great for problems like this. For example, if your file is tab delimited, the following should work awk '{FS=\t}{if ($2 != ) question = $2;}{print $1,question,$3}'' yourfile

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Joshua Welker
for Libraries Subject: RE: [CODE4LIB] Excel to XML (for a Drupal Feeds import) This should be quite doable in most programming languages with out-of-the-box tools and no tricky parsing code. The gist is to save in Excel as a delimited text file (tab is a good choice), then have your script ingest

Re: [CODE4LIB] Excel to XML (for a Drupal Feeds import)

2014-06-16 Thread Shaun Ellis
('myfile.xml', 'wb') as file ElementTree(rootNode).write(file) Josh Welker -Original Message- From: Joshua Welker [mailto:wel...@ucmo.edu] Sent: Monday, June 16, 2014 2:32 PM To: Code for Libraries Subject: RE: [CODE4LIB] Excel to XML (for a Drupal Feeds import) This should be quite doable

Re: [CODE4LIB] Excel to XML

2014-06-14 Thread Amelia Mowry
You could also look into using an xsd. It's a pretty simple document that allows you to define the structure of your xml file and assign excel columns to fields. That way, when you save excel as xml, you can have the proper hierarchy in your xml. There are some quirks, but overall it's pretty

[CODE4LIB] Excel to XML

2014-06-13 Thread Ryan Engel
Hello - I have an Excel spreadsheet that, for the purposes of an easy import into a Drupal site, I'd like to convert to XML. I know people more knowledgeable than I could code up something in Python or Perl to convert a CSV version of the data to XML (and I have a colleague who offered to

Re: [CODE4LIB] Excel to XML

2014-06-13 Thread Terry Brady
The current version of Excel offers a save as XML option. It will produce something like this. There is other wrapping metadata, but the table is pretty easy to parse. Table ss:ExpandedColumnCount=3 ss:ExpandedRowCount=7 x:FullColumns=1 x:FullRows=1 ss:DefaultRowHeight=15 Row Cell

Re: [CODE4LIB] Excel to XML

2014-06-13 Thread Dana Pearson
I don't use Excel but a client did who wanted to use XSL I had created ONIX to MARC to transformbibliographic metadata in Excel to XML. The built in Excel XML converter was not very helpful since empty cells were skipped so that it was impossible to use that result. There is an add on that