Excel table like output with printf


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Excel table like output with printf
# 1  
Old 12-12-2013
Excel table like output with printf

Hi All;

I try to create a excel like table with headers and some fields containing values, other long and complex mathematic formulas.

I have some header like : Name Formula Value True/False

Under name column, they are some formula names, formula column some long mathematic formulas like:

Daily something somehting Percentage ≡ Total number of something - ∑4i=1(Total number of someother thingsi - total number of a different thingsi) .


And value field is a numeric field containing 2 long numbers (10 digit or so). I want to write them as 2 different lines in same field. (value field)

True/false column consists of value t/f. So this will be filled manually so should be null.


So what is the easiest way to write them as an excel like table? I tried some printf command but they are all exploded. Is there an easier way to do it?

Thanks
# 2  
Old 12-12-2013
Show the input you have and the output you want.
# 3  
Old 12-12-2013
This is the table I would like to create. All the fields are same except I will fill vaule field with some number I obtained (they are stored in variables). They are numbers like 1204000000 (10 or 11 digits) and I want to write 2 numbers in value field for comparison maybe as 2 different lines in value fields.

Last edited by reseki; 12-13-2013 at 03:39 AM..
# 4  
Old 12-12-2013
Great, that's the output you want.

Now, show the input you have.
# 5  
Old 12-12-2013
String fields are the inputs. They won't change. Value fields are the numbers.
# 6  
Old 12-12-2013
And what do these string fields look like?
# 7  
Old 12-12-2013
Exactly as above. I Will take these names and formulas in the table above and assign them to some string variable such as name1 name2...name8 etc formula1 formula2...formula8
formula3 and values to value1 value1 .... value8
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I want query output to send on mail using table tag and output should be in table

#! /bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( ... (21 Replies)
Discussion started by: ankit.mca.aaidu
21 Replies

2. Programming

Sql developer how to upload the excel sheet in Oracle table

I have some records to be updated in oracle table. I am using sql developer tool. could any one tell me how to update those records in oracle table. I am having excel sheet with those records. (4 Replies)
Discussion started by: ramkumar15
4 Replies

3. 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

4. Shell Programming and Scripting

Managing output... echo or printf?

Hello script guru's as i write more and more code i always block at managing output... either writing to standard out, writing to files via std out (log, temp file, etc). Don't get me wrong 99% of the time it DOES the job but maybe there is more efficient. I'm writing a small script to... (2 Replies)
Discussion started by: maverick72
2 Replies

5. Shell Programming and Scripting

Problems with awk printf, formatted output

Hi, i have a script, which is incomplete, am on my way developing it. Input 1,12,2012,IF_TB001 2,12,2012,3K3 3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000 3,Z56,00000,53,411,W225,00,000, , ,USD,OM170,0000000000,000, , , , -550000000 4,Z56,COUNT, 4,SUM LOC,... (19 Replies)
Discussion started by: selvankj
19 Replies

6. Shell Programming and Scripting

printf Hexadecimal output

printf "%X\n" "A" 41 printf "%X\n" "2" 2 Expected 32 (not 2). Is there a "printf" which will output the hexadecimal value of a numeric character? (9 Replies)
Discussion started by: methyl
9 Replies

7. Programming

capture the output of printf into another variable

Hi , I wonder if in java I can pipe the below output of the printf into a variable: System.out.printf(" This is a test %s\n", myVariable); I want to keep the output of the printf command to create my history array. Thanks. (2 Replies)
Discussion started by: arizah
2 Replies

8. Shell Programming and Scripting

Sample ksh script for copy the data from excel to database table ?

Hi All, I need to convert the data from excel to database table in sybase. Please provide some sample script.. thanks, Royal. (1 Reply)
Discussion started by: royal9482
1 Replies

9. Shell Programming and Scripting

store the table data in excel file

Hello - I have a below table and i want to extract the data into excel sheet and send to different location. Here is the table structure... SQL> desc t_i1_exportdocs Name Null? Type ----------------------------------------- --------... (11 Replies)
Discussion started by: govindts
11 Replies

10. UNIX for Advanced & Expert Users

Help please...output problems with printf.

#include <stdio.h> #include <math.h> // this function calculates the volume of a Cylinder int main(void) { int r; // radius int h; // height double M_PI; // pi int pOne = pow (r, 2); // get user input of radius and height printf ("Enter your... (3 Replies)
Discussion started by: pwanda
3 Replies
Login or Register to Ask a Question