Access ods files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Access ods files
# 1  
Old 02-25-2011
Access ods files

How do I extract cell content from openoffice spreadsheets (ods files)?

If I e.g. have a document myspreadsheet.ods and I want to extract the content of cell A1 in sheet1, how do I do that using a linux shell script?
# 2  
Old 02-25-2011
locoroco,

You can try first saving your ods file in format like csv within open calc, then you can extract cell values using awk as follow:

Code:
 awk -F"," 'NR==1{print $1}' input.csv # Print "Cell 1,1=A1"

If you want to do all with shell script, googling I found that you can convert ods to csv installing "unoconv" utility, after that convert the ods file to csv for better handling sending the command
Code:
 unoconv -f csv $FILE_TO_CONVERT_NAME.ods
reference: http://solidcode.com/about/evconv.txt

and the complete script could be something like this
Code:
unoconv -f csv $FILE_TO_CONVERT_NAME.ods | awk -F"," 'NR==1{print $1}' > Output

Hope it helps
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Replacing a Disk in a ODS/SVM Mirror

Hi All BAsed on the below I would like to verifu two things (1) The udnerlying mirroris for '/mnt' na dit onlcy contaisne 1 sub-mirror, with one sliceon is one disk and hence, data loss on the mount point (the mount point, '/mnt' is backed up) (2) the Procedure for renewal # df -kh /mnt... (2 Replies)
Discussion started by: stevie_velvet
2 Replies

2. Shell Programming and Scripting

Xmllint - Xml-file problem --ods file not opening

Dear All, this is my first post on this Forum, glad to be here. I'm trying to fix an .ods file. Yes, I had a backup, but it's also corrupted. When opening the document I get this EM: read error format error discovered in the file in sub-document content.xml at 2,337040(row,col). So I... (3 Replies)
Discussion started by: jameslast
3 Replies

3. Shell Programming and Scripting

How to access files from different directories and to perform search action in those files?

Hi, I want to access files from different directories (for example: /home/dir1/file1 , /home/dir2/file2 ...) Like this i have to access these files(file1, file2...). (3 Replies)
Discussion started by: bangarukannan
3 Replies

4. UNIX for Dummies Questions & Answers

kernel giving access for multiple users to access files

hi all, i want to know y kernel is giving access for multiple users to access a file when one user may be the owner is executing that file. Because other user can manipulate that file when the other user is executing that file, it will give the unexpected result to owner . plz help me... (1 Reply)
Discussion started by: jimmyuk
1 Replies

5. UNIX for Dummies Questions & Answers

how to access files via their descriptors?

hello, I'm new here, and new to Linux. I was wondering how to get hold of a certain file's descriptor, and how to use that number so that I access the contents of the file. please give me a full example, that is (1) how to determine the descriptor and (2) what magic symbols to use so that... (4 Replies)
Discussion started by: ialoq
4 Replies

6. UNIX for Dummies Questions & Answers

how to identify files I cannot access

I want to use find (or something else) to give me a list of all files in a directory tree where the group access is not rwx or rw-. I'm trying to archive the whole directory tree, but it won't archive any files where I do not have at least read access. I have tried: find . ! -perm -060 but... (4 Replies)
Discussion started by: wvdeijk
4 Replies

7. Shell Programming and Scripting

To What files root does not have access to??

Hi, I just wanted to know to what files root does not have access, not even read....I read that .profile for any user is the only file which root cannot access is it true..??...If we have to use passwords and ID's in a script can we use them in .profile and call them as parameters..??? ... (3 Replies)
Discussion started by: mgirinath
3 Replies

8. UNIX for Dummies Questions & Answers

To What files root does not have access to??

Hi, I just wanted to know to what files root does not have access, not even read....I read that .profile for any user is the only file which root cannot access is it true..??...If we have to use passwords and ID's in a script can we use them in .profile and call them as parameters..??? ... (2 Replies)
Discussion started by: mgirinath
2 Replies

9. UNIX for Dummies Questions & Answers

Need help to access/mount so to access folder/files on a Remote System using Linux OS

Hi I need to access files from a specific folder of a Linux system from an another Linux System Remotely. I know how to, Export a folder on One SCO System & can access the same by using Import via., NFS in the Sco Unix SVR4 System using the scoadmin utility. Also, I know to use mount -t ... (2 Replies)
Discussion started by: S.Vishwanath
2 Replies
Login or Register to Ask a Question