Sponsored Content
Top Forums Shell Programming and Scripting Redirect the output to different worksheet in excel Post 302854867 by Corona688 on Wednesday 18th of September 2013 01:06:32 PM
Old 09-18-2013
For this, you really do need an XLS file, not CSV.

In order to make worksheets in an XLS file, you'll need install a perl module like Spreadsheet::WriteExcel

How to use it depends on what you want to do with it, of course. Show the text data you want to put into the spreadsheet please.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Redirect output

Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow /usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Discussion started by: mpang_
1 Replies

2. Shell Programming and Scripting

Redirect Output

Hi, I would like to list files: ls *.hdf But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt I have tried: ls *.hdf | tee test.txt However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Discussion started by: msb65
1 Replies

3. Shell Programming and Scripting

output redirect

Hi i am compiling a source code by make command. i want to redirect the output of make to a file but at the same time i want to see the output in terminal. how to do this ?. please suggest your idea. thanks in advance. Saravana ---------- Post updated at 05:24 PM ----------... (2 Replies)
Discussion started by: tsaravanan
2 Replies

4. Shell Programming and Scripting

Rename Worksheet

Hi, What is the syntax to rename excel worksheet present in testing.xls Suppose my excel name is testing.xls The worksheet name is sheet1. I want to change this worksheet name from sheet1 to TAB11. Thanks in advance. (2 Replies)
Discussion started by: debasis.mishra
2 Replies

5. Shell Programming and Scripting

Qshell output to excel

Hi all, I hope this is the right topic for this issue. I made a list with directories, files, size, ... and i want to export it to a .CSV file. He does creat my .csv file that i'm asking but i can't read anything of it. It is all weird symbolics etc. Even when i make a .txt file. Any... (3 Replies)
Discussion started by: CODIII
3 Replies

6. UNIX for Dummies Questions & Answers

redirect find output

I'm trying to get a list of directories with "2012" as one of the sub-directories (ex. ./TRAN/U214OU/IN/2012/03/01). I tried using find like this "find . -name 2012 -type d > list.out" but it won't write to file. What am I doing wrong or is there a better way to do this? (6 Replies)
Discussion started by: knotfinley
6 Replies

7. Shell Programming and Scripting

Convert xlsx worksheet to separate csv

Hi All, I need a solution to convert my .xlsx file which has lot of worksheet, convert to separate csv file. Is there any shell script to do this? I can’t use excel macro to do this, since it was password locked. I need the csv output as an input to my shell script. (1 Reply)
Discussion started by: ranjancom2000
1 Replies

8. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

9. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies

10. 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
Spreadsheet::WriteExcel::Formula(3pm)			User Contributed Perl Documentation		     Spreadsheet::WriteExcel::Formula(3pm)

NAME
Formula - A class for generating Excel formulas SYNOPSIS
See the documentation for Spreadsheet::WriteExcel DESCRIPTION
This module is used by Spreadsheet::WriteExcel. You do not need to use it directly. NOTES
The following notes are to help developers and maintainers understand the sequence of operation. They are also intended as a pro-memoria for the author. ;-) Spreadsheet::WriteExcel::Formula converts a textual representation of a formula into the pre-parsed binary format that Excel uses to store formulas. For example "1+2*3" is stored as follows: "1E 01 00 1E 02 00 1E 03 00 05 03". This string is comprised of operators and operands arranged in a reverse-Polish format. The meaning of the tokens in the above example is shown in the following table: Token Name Value 1E ptgInt 0001 (stored as 01 00) 1E ptgInt 0002 (stored as 02 00) 1E ptgInt 0003 (stored as 03 00) 05 ptgMul 03 ptgAdd The tokens and token names are defined in the "Excel Developer's Kit" from Microsoft Press. "ptg" stands for Parse ThinG (as in "That lexer can't grok it, it's a parse thang.") In general the tokens fall into two categories: operators such as "ptgMul" and operands such as "ptgInt". When the formula is evaluated by Excel the operand tokens push values onto a stack. The operator tokens then pop the required number of operands off of the stack, perform an operation and push the resulting value back onto the stack. This methodology is similar to the basic operation of a reverse-Polish (RPN) calculator. Spreadsheet::WriteExcel::Formula parses a formula using a "Parse::RecDescent" parser (at a later stage it may use a "Parse::Yapp" parser or "Parse::FastDescent"). The parser converts the textual representation of a formula into a parse tree. Thus, "1+2*3" is converted into something like the following, "e" stands for expression: e / | 1 + e / | 2 * 3 The function "_reverse_tree()" recurses down through this structure swapping the order of operators followed by operands to produce a reverse-Polish tree. In other words the formula is converted from in-fix notation to post-fix. Following the above example the resulting tree would look like this: e / | 1 e + / | 2 3 * The result of the recursion is a single array of tokens. In our example the simplified form would look like the following: (1, 2, 3, *, +) The actual return value contains some additional information to help in the secondary parsing stage: (_num, 1, _num, 2, _num, 3, ptgMul, ptgAdd, _arg, 1) The additional tokens are: Token Meaning _num The next token is a number _str The next token is a string _ref2d The next token is a 2d cell reference _ref3d The next token is a 3d cell reference _range2d The next token is a 2d range _range3d The next token is a 3d range _func The next token is a function _arg The next token is the number of args for a function _class The next token is a function name _vol The formula contains a voltile function The "_arg" token is generated for all lists but is only used for functions that take a variable number of arguments. The "_class" token indicates the start of the arguments to a function. This allows the post-processor to decide the "class" of the ref and range arguments that the function takes. The class can be reference, value or array. Since function calls can be nested, the class variable is stored on a stack in the @class array. The class of the ref or range is then read as the top element of the stack $class[-1]. When a "_func" is read it pops the class value. Certain Excel functions such as RAND() and NOW() are designated as volatile and must be recalculated by Excel every time that a cell is updated. Any formulas that contain one of these functions has a specially formatted "ptgAttr" tag prepended to it to indicate that it is volatile. A secondary parsing stage is carried out by "parse_tokens()" which converts these tokens into a binary string. For the "1+2*3" example this would give: 1E 01 00 1E 02 00 1E 03 00 05 03 This two-pass method could probably have been reduced to a single pass through the "Parse::RecDescent" parser. However, it was easier to develop and debug this way. The token values and formula values are stored in the %ptg and %functions hashes. These hashes and the parser object $parser are exposed as global data. This breaks the OO encapsulation, but means that they can be shared by several instances of Spreadsheet::WriteExcel called from the same program. Non-English function names can be added to the %functions hash using the "function_locale.pl" program in the "examples" directory of the distro. The supported languages are: German, French, Spanish, Portuguese, Dutch, Finnish, Italian and Swedish. These languages are not added by default because there are conflicts between functions names in different languages. The parser is initialised by "_init_parser()". The initialisation is delayed until the first formula is parsed. This eliminates the overhead of generating the parser in programs that are not processing formulas. (The parser should really be pre-compiled, this is to-do when the grammar stabilises). AUTHOR
John McNamara jmcnamara@cpan.org COPYRIGHT
X MM-MMX, John McNamara. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. perl v5.10.1 2010-02-02 Spreadsheet::WriteExcel::Formula(3pm)
All times are GMT -4. The time now is 10:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy