Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a CSV file written by a python script of mine. I want to make a shell script that opens the file in read-only mode, which I have done.

#!/bin/sh
libreoffice --view ~/Documents/timeclock.csv

My problem is that every time I open it, the Text Input dialog opens. This is an example of what the file looks like. It's semicolon separated. How can I get libreoffice to either use pre-set settings, or command line arguments?

;;;;;=SUM(D2:D100)
;;;;;15
;;;;;=F1*F2

=DATE(2012,10,13);=TIME(10,21,56);=TIME(18,45,27);=ABS(INDIRECT("B" & ROW()) - INDIRECT("C" & ROW()))*24
=DATE(2012,10,21);=TIME(10,23,16);=TIME(17,17,12);=ABS(INDIRECT("B" & ROW()) - INDIRECT("C" & ROW()))*24
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

See: http://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Handling_Spreadsheet_Documents_Files

and:

http://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options

with UNO you can set the filter options. With that you can write e.g. a StarBasic macro. http://www.openoffice.org/api/basic/man/tutorial/tutorial.pdf helps you with that.

You should be able to run such a macro from the commandline: http://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=8232

Another alternative is using Python/PyUno, Java or C++.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.