LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Table in Linux into .doc format

[ILUG] Table in Linux into .doc format

Chris Higgins chris.higgins at darach.ie
Mon Oct 11 13:42:08 IST 2004


On Mon, 11 Oct 2004 12:42:39 +0100
Timothy Murphy <tim at birdsnest.maths.tcd.ie> wrote:

> On Sunday 10 October 2004 23:25, Gareth Eason wrote:
> 
> >  Perhaps a quick chat with the system designers asking them for a
> > specification of required input format, rather than just a sample,
> > might yield some useful answers and make your workload a lot
> > simpler. 
> 
> I contacted the company in question,
> and they said they want an Excel file,
> and only gave a Word doc as an example
> because they thought people would find it easier to read.
> 
> Incidentally, the "project" is to send insurance forms for a school
> with each pupil listed (with date of birth, etc).
> 
> I'd love a little Java screen to put in the data.
> Does anyone know of such a thing?

Whadda ya need ? Nice GUI for you or someone else ? 
Whaddabout a little shell script that calls 'dialog'

while(result is not 'done' then )
 dialog --extra-button --extra-label "Done - Exit" --form "Enter User Details" 20 80 20 "Name:" 1 1 "name here" 1 10 30 30 "Birth:" 2 1 "birthday here d/m/y" 2 10 30 30 "Sex:" 3 1 "M/F" 3 10 1 1 >> user.input

then 
cat user.input | awk/perl/sed to process it nicely >> my.csv file

Add some smarts to the while loop and you can do data validation at each stage, and the
dialog UI is customisable so you can hide the back end completely amd make it easy
for anyone to use... 

With all the usual caveats about this not being finished code ( and wanting to insert tests for the
dialog tool return values etc, and not allowing root to run this as it's not the most secure way
of handling tmp files :-)

> 
> Surely it would be more interesting (and useful)
> than all these sed scripts ...

That's asking for trouble... I'd just advise at this stage that you
drop that line of interrogation or I'll have to wander around with
a bit of 4x2 to 're-educate' you :-)

> 
> 
> -- 
> Timothy Murphy  
> e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
> tel: +353-86-2336090, +353-1-2842366
> s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
> -- 
> Irish Linux Users' Group
> http://www.linux.ie/mailman/listinfo/ilug/
> 


-- 
Chris Higgins                              
Darach Technology Ltd                      tel: +353-1-6204370
email: chris.higgins at darach.ie          fax: +353-1-6204371
http://www.darach.ie



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell