LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Just read DOC and XLS file formats! (https://www.linuxquestions.org/questions/linux-software-2/just-read-doc-and-xls-file-formats-233767/)

SmallTalker 09-22-2004 05:50 AM

Just read DOC and XLS file formats!
 
So i need a software just for reading, and not for editing files in this format.

Is there any?

theYinYeti 09-22-2004 06:59 AM

Yes, there is such an app. It is called viewOOfile.sh, and here it is ;)
Code:

#!/bin/bash
# $1: path to the file to view

[ -f "$1" ] || exit 1
[ -r "$1" ] || exit 1

OLDPERM=$(find "$1" -printf "%m")
chmod a-w "$1"
soffice "$1"
chmod $OLDPERM "$1"

But this "software" has a small weakness: if the file you want to view is owned by someone else, and this someone explicitely gave you the right to write to it, then it won't be read-only.

Yves.

Proud 09-22-2004 07:56 AM

FYI that above shell script is a just a joke to use soffice (StarOffice), the non-free Sun version of OpenOffice. Try either.

inimino 09-22-2004 08:17 AM

I think the OP is asking if there is something like the MS Office viewer programs: small programs you can put on a CD or send in an email along with a file in case the receiving end doesn't have Office installed.

If you're sending documents to another Linux box, they might have OO.o installed anyway, and if you're not, such a program won't work, so I don't think something like this is practical or necessary for Linux.

The main reason MS releases those programs is to encourage people to distribute documents in Word, Powerpoint, etc formats, which is a horrible idea.

I think the closest equivalent on Linux is providing a link to OO.o :)

theYinYeti 09-23-2004 05:01 AM

Quote:

Originally posted by Proud FYI that above shell script is a just a joke to use soffice (StarOffice), the non-free Sun version of OpenOffice. Try either.
Yes it is a joke :) , because it still requires the PC to load the full OpenOffice binary. But it DOES work! :cool:

As for using StarOffice, no I wouldn't. As far as I know, the OpenOffice launcher script is still called soffice, or it has changed at some point in time. Maybe it is ooffice now? So just replace soffice with ooffice. Sorry for the mistake.

Yves.

Proud 09-23-2004 06:12 AM

I've only got an ooffice command, no soffice here. :)


All times are GMT -5. The time now is 10:25 PM.