Friday, February 12, 2010

[SW] How to import html tables into the OO Calc?

I am working on patent search these days (and it's really a terrible task, at least for me). With some assistant tools I got a downloaded list of the patents I've found, and this list has been given with a xls filename extension. The xls file works fine with MS Excel but not OO Calc. When I tried to open the xls file in my Ubuntu, it showed as a text file with gedit with some html tags in the content. So the xls file was essentially a html table file, and OO Calc just cannot open the file directly.

The unoconv was the first possible solution I found. It can convert between formats that supported by OpenOffice. The command line usage is simple, just define the ouput format as the following
$ unoconv -f ods originalfile.html

and the unoconv gives the output file with assigned format (originalfile.ods in this example). However, when I tried to open the converted ods file with OO Calc, nothing happened, the OO Calc didn't open anything and showed only empty content.

Luckily, another simpler solution has been there. Just utilize the import function provided by OO Calc itself to import the html table, then everything goes smoothly. You can find the function in ``Insert/Link to External Data'' and it comes up a dialog for choosing your file.

OpenOffice Calc Tips: Webquery : Importing HTML tables

No comments:

Post a Comment