{"id":1303,"date":"2016-10-30T14:58:44","date_gmt":"2016-10-30T14:58:44","guid":{"rendered":"http:\/\/blog.paranoidprofessor.com\/?p=1303"},"modified":"2016-10-30T15:02:27","modified_gmt":"2016-10-30T15:02:27","slug":"bridging-the-gap-to-excel-unoconv-tool","status":"publish","type":"post","link":"https:\/\/blog.paranoidprofessor.com\/index.php\/2016\/10\/30\/bridging-the-gap-to-excel-unoconv-tool\/","title":{"rendered":"bridging the gap to excel &#8211; unoconv tool"},"content":{"rendered":"<p>Some time back a customer asked that I provide my estimated hours every week. \u00a0I kept track of all my hours in a simple text file which is ok for reminding yourself of what happened but not so professional when dealing with customers.<\/p>\n<p>I guess as a software developer everything is a programming problem. \u00a0I entered my hours in a reglar format so I could extract them for later processing. \u00a0The data is a small table with several columns with one for each task and one row for each day.<\/p>\n<p>Initially was worried that I might have to read up on what the format of a Microsoft Excel file is but during my search I discovered that there is an open source tool <em><strong>unoconv<\/strong><\/em>.<\/p>\n<p>This tool is used for converting between different document formats ranging from doc and bmp to html and tiff.<\/p>\n<pre>unoconv --show\r\nThe following list of document formats are currently available:\r\n\r\n  bib      - BibTeX [.bib]\r\n  doc      - Microsoft Word 97\/2000\/XP [.doc]\r\n  doc6     - Microsoft Word 6.0 [.doc]                                                                                               \r\n  doc95    - Microsoft Word 95 [.doc]                                                                                                \r\n  docbook  - DocBook [.xml]                                                                                                          \r\n  docx     - Microsoft Office Open XML [.docx]                                                                                       \r\n  docx7    - Microsoft Office Open XML [.docx]                                                                                       \r\n  fodt     - OpenDocument Text (Flat XML) [.fodt]                                                                                    \r\n  html     - HTML Document (OpenOffice.org Writer) [.html]\r\n  latex    - LaTeX 2e [.ltx]\r\n  mediawiki - MediaWiki [.txt]\r\n  odt      - ODF Text Document [.odt]\r\n  ooxml    - Microsoft Office Open XML [.xml]\r\n  ott      - Open Document Text [.ott]\r\n  pdb      - AportisDoc (Palm) [.pdb]\r\n  pdf      - Portable Document Format [.pdf]\r\n  psw      - Pocket Word [.psw]\r\n  rtf      - Rich Text Format [.rtf]\r\n  sdw      - StarWriter 5.0 [.sdw]\r\n  sdw4     - StarWriter 4.0 [.sdw]\r\n  sdw3     - StarWriter 3.0 [.sdw]\r\n  stw      - Open Office.org 1.0 Text Document Template [.stw]\r\n  sxw      - Open Office.org 1.0 Text Document [.sxw]\r\n  text     - Text Encoded [.txt]\r\n  txt      - Text [.txt]\r\n  uot      - Unified Office Format text [.uot]\r\n  vor      - StarWriter 5.0 Template [.vor]\r\n  vor4     - StarWriter 4.0 Template [.vor]\r\n  vor3     - StarWriter 3.0 Template [.vor]\r\n  wps      - Microsoft Works [.wps]\r\n  xhtml    - XHTML Document [.html]\r\n\r\nThe following list of graphics formats are currently available:\r\n\r\n  bmp      - Windows Bitmap [.bmp]\r\n  emf      - Enhanced Metafile [.emf]\r\n  eps      - Encapsulated PostScript [.eps]\r\n  fodg     - OpenDocument Drawing (Flat XML) [.fodg]\r\n  gif      - Graphics Interchange Format [.gif]\r\n  html     - HTML Document (OpenOffice.org Draw) [.html]\r\n  jpg      - Joint Photographic Experts Group [.jpg]\r\n  met      - OS\/2 Metafile [.met]\r\n  odd      - OpenDocument Drawing [.odd]\r\n  otg      - OpenDocument Drawing Template [.otg]\r\n  pbm      - Portable Bitmap [.pbm]\r\n  pct      - Mac Pict [.pct]\r\n  pdf      - Portable Document Format [.pdf]\r\n  pgm      - Portable Graymap [.pgm]\r\n  png      - Portable Network Graphic [.png]\r\n  ppm      - Portable Pixelmap [.ppm]\r\n  ras      - Sun Raster Image [.ras]\r\n  std      - OpenOffice.org 1.0 Drawing Template [.std]\r\n  svg      - Scalable Vector Graphics [.svg]\r\n  svm      - StarView Metafile [.svm]\r\n  swf      - Macromedia Flash (SWF) [.swf]\r\n  sxd      - OpenOffice.org 1.0 Drawing [.sxd]\r\n  sxd3     - StarDraw 3.0 [.sxd]\r\n  sxd5     - StarDraw 5.0 [.sxd]\r\n  sxw      - StarOffice XML (Draw) [.sxw]\r\n  tiff     - Tagged Image File Format [.tiff]\r\n  vor      - StarDraw 5.0 Template [.vor]\r\n  vor3     - StarDraw 3.0 Template [.vor]\r\n  wmf      - Windows Metafile [.wmf]\r\n  xhtml    - XHTML [.xhtml]\r\n  xpm      - X PixMap [.xpm]\r\n\r\nThe following list of presentation formats are currently available:\r\n\r\n  bmp      - Windows Bitmap [.bmp]\r\n  emf      - Enhanced Metafile [.emf]\r\n  eps      - Encapsulated PostScript [.eps]\r\n  fodp     - OpenDocument Presentation (Flat XML) [.fodp]\r\n  gif      - Graphics Interchange Format [.gif]\r\n  html     - HTML Document (OpenOffice.org Impress) [.html]\r\n  jpg      - Joint Photographic Experts Group [.jpg]\r\n  met      - OS\/2 Metafile [.met]\r\n  odg      - ODF Drawing (Impress) [.odg]\r\n  odp      - ODF Presentation [.odp]\r\n  otp      - ODF Presentation Template [.otp]\r\n  pbm      - Portable Bitmap [.pbm]\r\n  pct      - Mac Pict [.pct]\r\n  pdf      - Portable Document Format [.pdf]\r\n  pgm      - Portable Graymap [.pgm]\r\n  png      - Portable Network Graphic [.png]\r\n  potm     - Microsoft PowerPoint 2007\/2010 XML Template [.potm]\r\n  pot      - Microsoft PowerPoint 97\/2000\/XP Template [.pot]\r\n  ppm      - Portable Pixelmap [.ppm]\r\n  pptx     - Microsoft PowerPoint 2007\/2010 XML [.pptx]\r\n  pps      - Microsoft PowerPoint 97\/2000\/XP (Autoplay) [.pps]\r\n  ppt      - Microsoft PowerPoint 97\/2000\/XP [.ppt]\r\n  pwp      - PlaceWare [.pwp]\r\n  ras      - Sun Raster Image [.ras]\r\n  sda      - StarDraw 5.0 (OpenOffice.org Impress) [.sda]\r\n  sdd      - StarImpress 5.0 [.sdd]\r\n  sdd3     - StarDraw 3.0 (OpenOffice.org Impress) [.sdd]\r\n  sdd4     - StarImpress 4.0 [.sdd]\r\n  sxd      - OpenOffice.org 1.0 Drawing (OpenOffice.org Impress) [.sxd]\r\n  sti      - OpenOffice.org 1.0 Presentation Template [.sti]\r\n  svg      - Scalable Vector Graphics [.svg]\r\n  svm      - StarView Metafile [.svm]\r\n  swf      - Macromedia Flash (SWF) [.swf]\r\n  sxi      - OpenOffice.org 1.0 Presentation [.sxi]\r\n  tiff     - Tagged Image File Format [.tiff]\r\n  uop      - Unified Office Format presentation [.uop]\r\n  vor      - StarImpress 5.0 Template [.vor]\r\n  vor3     - StarDraw 3.0 Template (OpenOffice.org Impress) [.vor]\r\n  vor4     - StarImpress 4.0 Template [.vor]\r\n  vor5     - StarDraw 5.0 Template (OpenOffice.org Impress) [.vor]\r\n  wmf      - Windows Metafile [.wmf]\r\n  xhtml    - XHTML [.xml]\r\n  xpm      - X PixMap [.xpm]\r\n\r\nThe following list of spreadsheet formats are currently available:\r\n\r\n  csv      - Text CSV [.csv]\r\n  dbf      - dBASE [.dbf]\r\n  dif      - Data Interchange Format [.dif]\r\n  fods     - OpenDocument Spreadsheet (Flat XML) [.fods]\r\n  html     - HTML Document (OpenOffice.org Calc) [.html]\r\n  ods      - ODF Spreadsheet [.ods]\r\n  ooxml    - Microsoft Excel 2003 XML [.xml]\r\n  ots      - ODF Spreadsheet Template [.ots]\r\n  pdf      - Portable Document Format [.pdf]\r\n  pxl      - Pocket Excel [.pxl]\r\n  sdc      - StarCalc 5.0 [.sdc]\r\n  sdc4     - StarCalc 4.0 [.sdc]\r\n  sdc3     - StarCalc 3.0 [.sdc]\r\n  slk      - SYLK [.slk]\r\n  stc      - OpenOffice.org 1.0 Spreadsheet Template [.stc]\r\n  sxc      - OpenOffice.org 1.0 Spreadsheet [.sxc]\r\n  uos      - Unified Office Format spreadsheet [.uos]\r\n  vor3     - StarCalc 3.0 Template [.vor]\r\n  vor4     - StarCalc 4.0 Template [.vor]\r\n  vor      - StarCalc 5.0 Template [.vor]\r\n  xhtml    - XHTML [.xhtml]\r\n  xls      - Microsoft Excel 97\/2000\/XP [.xls]\r\n  xls5     - Microsoft Excel 5.0 [.xls]\r\n  xls95    - Microsoft Excel 95 [.xls]\r\n  xlt      - Microsoft Excel 97\/2000\/XP Template [.xlt]\r\n  xlt5     - Microsoft Excel 5.0 Template [.xlt]\r\n  xlt95    - Microsoft Excel 95 Template [.xlt]\r\n  xlsx     - Microsoft Excel 2007\/2010 XML [.xlsx]<\/pre>\n<p>My extracted data is pretty much what you would expect for csv data &#8211; in the USA.<\/p>\n<div style=\"margin-left: 2cm;\">Joe Bloggs<br \/>\nWeek # 20<br \/>\ndate,day,support,development,documentation,testing,meetings,comments<br \/>\n20150511,mon,2,5,1,0,0,write new program for calculation<br \/>\n20150512,tue,3,3,0,2,0,division by zero for large numbers<br \/>\n20150513,wed,0,4,4,0,0,Find bug and then document new changes<br \/>\n20150514,thr,2,0,2,2,2,status meeting and documentations<br \/>\n20150515,fri,4,1,1,1,1,online training; work on pilot<br \/>\n20150516,sat,0,0,0,0,0,<br \/>\n20150517,sun,0,0,0,0,0,<br \/>\nTotals, ,11,13,8,5,3,<\/div>\n<p>&nbsp;<\/p>\n<p>In the USA csv files are comma separate files, but this isn&#8217;t the case in other lands where the comma is used as the decimal separator. I could not find out how to convert semicolon delimited files. \u00a0This wasn&#8217;t a problem for me, especially since this was just a temporary internal file on the way to the xls file.<\/p>\n<p>So my particular task of converting a csv file into an excel spreadsheet is obviously not challenging this program at all but the it is really neat that I can create a ubiquitous xls format without any real effort at all.<\/p>\n<p>Unfortunately this utility is a command line utility so it may be less friendly for those less comfortable with the command line.<\/p>\n<blockquote><p>unoconv -f &lt;output format&gt; &lt;input file&gt;<\/p>\n<p>unoconv \u00a0-f \u00a0xls \u00a0week17.csv<\/p><\/blockquote>\n<p><a href=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/10\/unoconv-samplexls.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1635 size-full\" src=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/10\/unoconv-samplexls.png\" alt=\"unoconv-samplexls\" width=\"854\" height=\"546\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/10\/unoconv-samplexls.png 854w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/10\/unoconv-samplexls-300x192.png 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/10\/unoconv-samplexls-768x491.png 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/a><\/p>\n<p>However there is one little thing that you do need to keep in mind, it is <strong>not<\/strong> possible to run this tool at the same time that open office \/ libre office is running. \u00a0If you do then you will see the following message.<\/p>\n<blockquote><p>Error: Unable to connect or start own listener. Aborting.<\/p><\/blockquote>\n<p>The unoconv utility is common in many linux repositories but it is also available for windows.<\/p>\n<p><a href=\"https:\/\/github.com\/dagwieers\/unoconv\/releases\">https:\/\/github.com\/dagwieers\/unoconv\/releases<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time back a customer asked that I provide my estimated hours every week. \u00a0I kept track of all my hours in a simple text file which is ok for reminding yourself of what happened but not so professional when &hellip; <a href=\"https:\/\/blog.paranoidprofessor.com\/index.php\/2016\/10\/30\/bridging-the-gap-to-excel-unoconv-tool\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1303"}],"collection":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/comments?post=1303"}],"version-history":[{"count":10,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1303\/revisions"}],"predecessor-version":[{"id":1641,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1303\/revisions\/1641"}],"wp:attachment":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/media?parent=1303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/categories?post=1303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/tags?post=1303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}