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

Show the input you have and the output you want.

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.

Great, that's the output you want.

Now, show the input you have.

String fields are the inputs. They won't change. Value fields are the numbers.

And what do these string fields look like?

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

I'm not sure you can put computable formulas into .csv- files. So what you can do is print four constant/variable column values, separated by semicolons or commas.
Two lines in one cell will be difficult to achieve in *nix OS - EXCEL uses a single <new line> char therefore (as opposed to the ususal <CR><LF> pair windows uses for line end), which is the line end char in *nix.

Can you explain a little more what this output file is for.

Is it supposed to be opened by Excel, viewed in a character terminal, viewed with a browser (e.g. Firefox) on windows/linux, emailed as an attachment (e.g. pdf or html)

After generating this output, I will c/p to word files. I have about 72 tables like same. So I want to prevent reptition. If two values in same field is not possible maybe I can put them in the field like lval, rval. Each one for side of the equality. And if to put whole formula would be difficult, I can also write formula 1 formula 2 never mind. And explain each of these formulas somewhere else in document. I just need how I can get these table like output with a printf command. Background color is not important neither are field separator lines.