Results 1 to 2 of 2

Thread: where can i found a program in C that returns how many columns and lines a txt has?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    4

    where can i found a program in C that returns how many columns and lines a txt has?

    Need a program that returns the number of columns and lines that a *.txt has

    something like that:

    12/12/2001 13:02:06 16; 9057; openpu;00630;CDM;9001;00
    12/12/2001 13:06:51 16; 10; openpu;00630;CDM;9001;00
    12/12/2001 13:26:08 16; 10; openpu;00630;CDM;9001;00

    it should return

    9 columns and 3 lines..

    Can u help me!! pls

    tks

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Since this txt is in an irregular format (sometimes the seperator is ';', sometimes ' ', sometimes both), you may have to write it yourself.
    As an alternative you can load it into excel as a comma seperated values table, by playing with the settings you could get it to do that corect. Then it's easy, just count the rows and columns.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width