LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Most Interesting Problem I Had Ever Got.

*ONLY WELL EQUIPED PEOPLE REQUIRED TO SOLVE IT *
MOST INTERESTIN PROBLEM I HAD EVER GOT : I WILL SAY THE PERSO
CHAMPION OF THIS FORUM WHO WILL SOLVE IT , IF YOU HAVE ANY QUESTIONS O
QUERIS PLEASE REPLY.

Sanario : i want to convert a text file in to excel sheet , there ar
no dilimiters nothing specified, just this thing is specified tha
there are more spaces between the columns, this sanario is als
rechognized by me, hay listen when i want to judge that i am readin
words , every thing with a single space is considered as a word. isen
it interesting :-)

I had used this technique , here is given steps of construction

a) open the text file
b) read a data line
c) split the data line in an array with space delimiter or DEFAUL
delimiter
now this array will be somthing intersting, words in this array, o
every word in this array will be on consecitive locations , hope yo
understand that, and when we find that there are many locations o
spaces between the filled array locations, i consider that columns ar
started comming, Actually this is approximation ,because my client i
not helping me out. so you people have to help me out.

d) write the data in to the excel sheet columns .
c) Increment the column when you find (number of spaces ) in the arra
, otherwise write the words from the array in to the current row an
the current location.


Hay tell me this thing that is this possible here is a line


Problem area :
col1 col2 col3 col4
a b c d
b c d
a b d
a c d



Q : Now tell me that how you are doing this
A : i pick up this line ( col1 col2 col3 col4 ) and apply an algorighe
on that is based on approximation i had assumed that words containin
space are same words, but when there are lots of spaces between th
columns then it means that these are different columns. ok i read thi
line now the shape of the array will be like thre will be a on firs
loc then spaces , i mean constant spaces, then again b and agai
constant spaces , then again c and constant spaces again and the
again d , there comes a situation where i find some missing column
means as in row number 3 of above data given ,

WINNING QUESTION :
Can any buddy tell me that how can i go to konow that a missin
column below a is detected. , i know its hard for you all , t
understand this problem, any person having easier technique then thi
can be the winner. ( for sure ) , so reply ASAP .


My expected solution : ( but not very good)
i will check that when i will start reading columns, i will chec
that how how many space sequences are there between the columns. an
when i will find that this number has decreased then i will do this
find that where the column is missing ,
is it a first column
is it a second column
is it a third column
And then i will put an extra column in the excel sheet for tha
perticular position .
Please help me out, it is one of some interesting problems that i ha
foun

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interesting Formula Problem Michael Laferriere Excel Worksheet Functions 6 March 9th 07 12:44 AM
Interesting TIF file problem TBird Excel Discussion (Misc queries) 5 July 5th 05 10:32 PM
Interesting Treeview problem. RB Smissaert Excel Programming 1 January 26th 04 06:35 PM
Interesting applied spreadsheet problem Trevor Stokes Excel Programming 4 August 29th 03 12:59 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"