Sponsored Content
Top Forums Shell Programming and Scripting How to handle Microsoft Excel in Linux Scripting Post 302164338 by varungupta on Monday 4th of February 2008 01:17:35 PM
Old 02-04-2008
Quote:
Originally Posted by envisage
Hi,

I am having a Excel sheets with 4 columns and 50 rows.
I need a script which check Date columns in excel sheet and then replace few cells with the random number (based on a date check operator).

I then need the excel sheet back to my window system, where is Linux is the remote system.

Thanks
hey,

$ cat /tmp/file.txt
NAME ID YEAR
abc 25 1995
ced 34 1977
ttt 43 1983

Create a csv file,which can be opened up in XL,

awk '{print $1","$2","$3}' < /tmp/file.txt > /tmp/file.csv

cat /tmp/file.csv
NAME,ID,YEAR
abc,25,1995
ced,34,1977
ttt,43,1983


Thanks.Smilie
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to handle case insensitive in shell scripting

Hi All, I am new to this forum also new to shell scripting. I have a requirement to read a text from a file which can be in any case like LOGFILE or LogFile or logfile or lOgfILE etc.. Can you guys help me out. Thanks, Bacsi01 (1 Reply)
Discussion started by: bacsi01
1 Replies

2. UNIX for Dummies Questions & Answers

Read microsoft excel in Unix

Hey guys, Can we read a microsoft excel spreadsheet in Unix / linux. If so, what are the steps to be followed? I know we can convert the excel workbook as a CSV and then read it in unix. Are there any other direct methods? thanks prasan81 (2 Replies)
Discussion started by: prasan81
2 Replies
Test::Excel::Template::Plus(3pm)			User Contributed Perl Documentation			  Test::Excel::Template::Plus(3pm)

NAME
Test::Excel::Template::Plus - Testing module for use with Excel::Template::Plus SYNOPSIS
use Test::More tests => 1; use Test::Excel::Template::Plus; my $template = Excel::Template::Plus->new( engine => 'TT', template => 'test.tmpl', config => { INCLUDE => [ '/templates' ] }, params => { ... } ); $template->write_file('test.xls'); # compare the file we just made with # an existing example file ... cmp_excel_files("test.xls", "t/xls/test.xls", '... the excel files matched'); DISCLAIMER
This module is woefully incomplete. It works for my very basic purposes right now, but it is surely going to need lots or work in the future to make it really usable. DESCRIPTION
This module attempts to provide a means of testing and comparing dynamically generated excel files. Currently it only supports comparing two excel files for some approximation of strutural (values within cells) and visual (formatting of said cells) equivalence. As a by product of the implementation, elements may get compared which don't really need comparing, and things which do need comparing may be skipped. This will get refined as time goes by and the module is used in more heavyweight situations. FUNCTIONS
cmp_excel_files($file1, $file2, $msg) BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2007-2010 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-05-06 Test::Excel::Template::Plus(3pm)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy