Frequently asked questions - Calc
How to open text files with an extension other than .CSV or .TXT (.TAB, .PRN,...) in Calc
By default, files with the extension .tab open as text documents in Writer, although they are often CSV files which should be opened with Calc.
The first solution is to rename the file as .CSV and then follow these instructions.
However, if you often need to handle this type of file, it may be easier to change the configuration of LO to consider such files as CSV files.
In what follows <LibreOffice> represents the installation directory of LibreOffice, for example:
- MS-Windows :
C:\Program Files\LibreOffice 3\
- linux :
To open .TAB files with the CSV filter of LibreOffice, follow these instructions:
- Close LibreOffice and its quick launcher.
- Make a backup copy of the file <LibreOffice>/Basis/share/registry/calc.xcd
- Edit it.
- Search for this string: calc_Text_txt_csv_StarCalc. The second occurrence of the string will look like this:
<node oor:name="'''calc_Text_txt_csv_StarCalc'''" oor:op="replace" > <prop oor:name="DetectService"> <value>com.sun.star.comp.calc.FormatDetector</value> </prop> <prop oor:name="URLPattern"/> <prop oor:name="Extensions"> '''<value>csv txt xls</value>''' </prop> <prop oor:name="MediaType"> <value>text/plain</value> </prop> <prop oor:name="Preferred"> <value>false</value> </prop> <prop oor:name="PreferredFilter"> <value>Text - txt - csv (StarCalc)</value> </prop> <prop oor:name="UIName"> <value>Text - txt - csv (StarOffice Calc)</value> </prop> <prop oor:name="ClipboardFormat"/> </node>
Note : to save space, the return characters at the ends of the lines have been omitted in this file. This makes it difficult for human beings to read it. If you wish, you can insert the returns.
- Modify the line: <prop oor:name="Extensions"> <value>csv txt xls</value> </prop>
- Add the extensions that you want to have recognised, for example: <prop oor:name="Extensions"> <value>csv txt xls tab prn</value> </prop>
- Save the file.
The next time you open LibreOffice with a file that has the extension in question, the CSV file opening dialog will be displayed.