[HOWTO] Linux and Windows export movie database to spreadsheet.
#1
This method will export your database info to a spreadsheet that can be shared with friends easily. It uses Windows software that works under Wine so it can be done easily under Linux (I have never actually tried under Windows so know any dependencies that are needed)

Software needed
Install wine and winetricks *Linux only
Download msxsl.exe from http://www.microsoft.com/en-us/download/...x?id=21714
Install libreoffice if needed (comes preinstalled on Ubuntu)

Setup:
Run
Code:
winetricks msxml4
from a command line. and click through everything to install. Note it asked me to login to something but I clicked past it leaving it empty and everything worked fine

Save the following to a text file called convert.xsl The following is my chosen options and you can change to suit yourself.
I chose the pipe "|" as the field seperator since commas and semicolons have been knowing to be in the movie outline and caused problem

Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="text" indent="no" encoding="UTF-8"/>


<xsl:template match="videodb">
<xsl:text>Title|Year|IMDB ID|IMDB Rating|Genre|Movie Outline</xsl:text>
<xsl:text>&#xD;&#xA;</xsl:text>
<xsl:for-each select="movie">
<xsl:sort select="title"/>
<xsl:value-of select="title"/>
<xsl:text>|</xsl:text>
<xsl:value-of select="year"/>
<xsl:text>|</xsl:text>
<xsl:value-of select="id"/>
<xsl:text>|</xsl:text>
<xsl:value-of select="rating"/>
<xsl:text>|</xsl:text>
<xsl:value-of select="genre"/>
<xsl:text>|</xsl:text>
<xsl:value-of select="outline"/>
<xsl:text>|</xsl:text>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>


The actual process:
Export your database as a single file and make sure msxsl.exe, videodb.xml, and convert.xsl are in the same directory
Run from command line
Code:
wine msxsl.exe videodb.xml convert.xsl -o movies.csv

Open movies.csv with Libreoffice Calc and at the import box change the "seperated by" to other and type in | (shift \ incase your font makes that look like a lower case L or capital i) un-check any others
Also empty the "text delimiter" or it can cause problems with the outline field
Hit ok and you are done.

Note I had to use Libreoffice instead of Google Docs even though I would prefer the latter. Since Google didn't have a text delimiter box to empty and I couldn't get it to import correctly. So after saving with Libreoffice I just upload the file to Google to share the list.

Windows users just ignore the wine info to use this tutorial and maybe tell me your experience with importing the file to Microsoft Office.


Credits:
http://forum.xbmc.org/showthread.php?tid=130495
Which is how I found out about
http://www.waldherr.org/howto-export-you...ry-to-csv/
Reply

Logout Mark Read Team Forum Stats Members Help
[HOWTO] Linux and Windows export movie database to spreadsheet.0