Hi,
I have a problem in formatting the excel file from my script.
Assume that there is a text file generated using a 'C shell Unix script' with a format similar to the one seen below. Each column has a fixed length and every row is going to have a value against a column depending on the section in picture. It could be simply empty space as well. What I am trying to say is that the rows under each section are going to be of fixed length with clear separation between each column.
Annual Report
\--------------
First Section
\-------------
ABC DEF HGFDG JKLLJ
--- --- ----- \-----
111 343 hhhjh 67676
989 242 sdsff 56547
Second Section
\--------------
QER BNM TRERT DFDGF
--- --- ----- \-----
111 343 hhhjh 67676
989 242 sdsff 56547
Summary
\-------
First Section - 2 lines Second Section - 2 lines
Requirement:-
It is required to view the text file contents in an excel sheet. It goes without saying that the contents should be appropriately formatted. In other words say the first line here 'Annual Report' needs to be centered to the contents beneath it. Similarly in each section the column names need to appear in individual cells.
Trial made:-
An attempt was made to save the text file as a '.xls' file in the script itself. On opening the file it was found that the headers both the overall heading and the section headers were not properly aligned. Also the column names did not appear in separate cells though the column data appeared in individual cells possibly because each row under a section is of fixed length as described above.
Question:-
Is it possible to write a 'MACRO' using Unix or any other language so that it is possible to view the text file content in an excel sheet with necessary formatting applied? Suggest any possible method known.
with thanks in advance
subra