Sponsored Content
Top Forums Shell Programming and Scripting Help on email data file as excel from unix!! Post 302248659 by MrC on Sunday 19th of October 2008 02:08:24 AM
Old 10-19-2008
Format the cells as Number (not General), and set the decimal places to 0 if you want. Then export/save as text.
MrC
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send email with attachment in form of excel in unix

Hi, I have a shell script which send email with an attachment in the form of an email. However, the when I open the attachment, all the data comes in one column. How do I format the data in the excel sheet while sending the email? Thanks (8 Replies)
Discussion started by: bdebroy
8 Replies

2. UNIX for Advanced & Expert Users

how to read the data from an excel sheet and use those data as variable in the unix c

I have 3 columns in an excel sheet. c1 c2 c3 EIP_ACCOUNT SMALL_TS_01 select A.* from acc; All the above 3 col shoud be passed a variable in the unix code. 1.How to read an excel file 2.How to pass these data as variable to the unic script (1 Reply)
Discussion started by: Anne Grace
1 Replies

3. Shell Programming and Scripting

UNIX -> send data as excel in seperate cells

Hi I have a data file in UNIX as follows. I need to send this file in Mail as excel format. but the problem i face is i get the data all in single cells per row. what can i do to get the data in seperate cells. File -> attachment.xls data data data data data1 data1 ... (1 Reply)
Discussion started by: vj8436
1 Replies

4. UNIX for Advanced & Expert Users

Zip an excel file and email using script.

Hi All, Currently i am using below script to attach excel and email from a Unix script. uuencode ASC.xls|mailx -m -s "ABCD_subject`TZ=CST+24 date +%d-%b-%y`" email@email.com Can anyone give me or help me in zipping excel and sending that email as the excel is very heavy. Thanks, (14 Replies)
Discussion started by: Nithin
14 Replies

5. Shell Programming and Scripting

How to extract data into excel from a database in unix

Hello viewers, I am connecting to db2 database from unix. I am executing a query for example select * from emp. I need to export the data obtained from the above command to a excel file. Could you please suggest how to proceed on this? thanks and regards, k.n.v.santosh (3 Replies)
Discussion started by: santoshaarudhra
3 Replies

6. Shell Programming and Scripting

How to write text file data to excel using UNIX shell script?

Hi All, I have the requirement in unix shell script. I want to write the "ls -ltr" command out put to excel file as below. Input :text file data : drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x 2 apx aim 4096 Nov 29 18:40 drwxr-xr-x 5 root root 4096 Oct 2 12:26 drwxr-xr-x... (10 Replies)
Discussion started by: Balasankar
10 Replies

7. UNIX for Dummies Questions & Answers

Load UNIX data into excel sheet

Hi, i have some data in a temporary file in Unix (the data is taken from the result of an SQL query). Now i want to dump that data into an excel sheet. How to do that. Someone please advise. Thanks Regards, Vinit (3 Replies)
Discussion started by: vinit raj
3 Replies

8. UNIX for Dummies Questions & Answers

UNIX data to be updated to ms excel sheet

hi, i wanted to add unix data to be updated to the excel sheet. (3 Replies)
Discussion started by: rupesh.bombale
3 Replies

9. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

10. UNIX for Beginners Questions & Answers

Extract UNIX data to excel

Hi, I would like to extract the data from particular date, 1. may i know which command i need to use? 2. Extract from unix command (those extracted above) to excel? Please assist. Thanks (2 Replies)
Discussion started by: Peru
2 Replies
Locale::Maketext::Cookbook(3perl)			 Perl Programmers Reference Guide			 Locale::Maketext::Cookbook(3perl)

NAME
Locale::Maketext::Cookbook - recipes for using Locale::Maketext INTRODUCTION
This is a work in progress. Not much progress by now :-) ONESIDED LEXICONS
Adapted from a suggestion by Dan Muey It may be common (for example at your main lexicon) that the hash keys and values coincide. Like that q{Hello, tell me your name} => q{Hello, tell me your name} It would be nice to just write: q{Hello, tell me your name} => '' and have this magically inflated to the first form. Among the advantages of such representation, that would lead to smaller files, less prone to mistyping or mispasting, and handy to someone translating it which can simply copy the main lexicon and enter the translation instead of having to remove the value first. That can be achieved by overriding "init" in your class and working on the main lexicon with code like that: package My::I18N; ... sub init { my $lh = shift; # a newborn handle $lh->SUPER::init(); inflate_lexicon(\%My::I18N::en::Lexicon); return; } sub inflate_lexicon { my $lex = shift; while (my ($k, $v) = each %$lex) { $v = $k if !defined $v || $v eq ''; } } Here we are assuming "My::I18N::en" to own the main lexicon. There are some downsides here: the size economy will not stand at runtime after this "init()" runs. But it should not be that critical, since if you don't have space for that, you won't have space for any other language besides the main one as well. You could do that too with ties, expanding the value at lookup time which should be more time expensive as an option. DECIMAL PLACES IN NUMBER FORMATTING
After CPAN RT #36136 (https://rt.cpan.org/Ticket/Display.html?id=36136) The documentation of Locale::Maketext advises that the standard bracket method "numf" is limited and that you must override that for better results. It even suggests the use of Number::Format. One such defect of standard "numf" is to not be able to use a certain decimal precision. For example, $lh->maketext('pi is [numf,_1]', 355/113); outputs pi is 3.14159292035398 Since pi X 355/116 is only accurate to 6 decimal places, you would want to say: $lh->maketext('pi is [numf,_1,6]', 355/113); and get "pi is 3.141592". One solution for that could use "Number::Format" like that: package Wuu; use base qw(Locale::Maketext); use Number::Format; # can be overridden according to language conventions sub _numf_params { return ( -thousands_sep => '.', -decimal_point => ',', -decimal_digits => 2, ); } # builds a Number::Format sub _numf_formatter { my ($lh, $scale) = @_; my @params = $lh->_numf_params; if ($scale) { # use explicit scale rather than default push @params, (-decimal_digits => $scale); } return Number::Format->new(@params); } sub numf { my ($lh, $n, $scale) = @_; # get the (cached) formatter my $nf = $lh->{__nf}{$scale} ||= $lh->_numf_formatter($scale); # format the number itself return $nf->format_number($n); } package Wuu::pt; use base qw(Wuu); and then my $lh = Wuu->get_handle('pt'); $lh->maketext('A [numf,_1,3] km de distancia', 1550.2222); would return "A 1.550,222 km de distancia". Notice that the standard utility methods of "Locale::Maketext" are irremediably limited because they could not aim to do everything that could be expected from them in different languages, cultures and applications. So extending "numf", "quant", and "sprintf" is natural as soon as your needs exceed what the standard ones do. perl v5.14.2 2011-09-19 Locale::Maketext::Cookbook(3perl)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy