formatting of txt file

Hi,

Can anybody can help me in in formatting the below data for me
The below data is coming in a txt file and i need the data in a excel file

However when i put in excel i am not getting any structured form
I need the Reference mentioned against the numeric value in the separate 
column as heading and the data below should come below the heading. I  have 
tried, but i have to a lot of manual edit after formatting.

1.Emplyoee name
bsdcbasdb hbvabfvas
2.Date 
12-12-09
3.Address Dettails
12/2 main street
City - bvauisdbc

Pin code- 1100154
4. Department
snbvsivnsvn
oihbvisudfnv
5. Monthly income
121646.00

structured format
Emplyoee name          Date        Address Dettails       Department    
Monthly income
bsdcbasdb hbvabfv  12-12-09 12/2 main street        snbvsivnsvn           
121646.00
                                              City - bvauisdbc        
oihbvisudfnv   
                                              Pin code- 1100154
0
Utf
5/10/2010 3:24:01 PM
excel.programming 6508 articles. 2 followers. Follow

4 Replies
537 Views

Similar Articles

[PageSpeed] 49

Radhakant Panigrahi wrote on 5/10/2010 :
> Hi,
>
> Can anybody can help me in in formatting the below data for me
> The below data is coming in a txt file and i need the data in a excel file
>
> However when i put in excel i am not getting any structured form
> I need the Reference mentioned against the numeric value in the separate 
> column as heading and the data below should come below the heading. I  have 
> tried, but i have to a lot of manual edit after formatting.
>
> 1.Emplyoee name
> bsdcbasdb hbvabfvas
> 2.Date 
> 12-12-09
> 3.Address Dettails
> 12/2 main street
> City - bvauisdbc
>
> Pin code- 1100154
> 4. Department
> snbvsivnsvn
> oihbvisudfnv
> 5. Monthly income
> 121646.00
>
> structured format
> Emplyoee name          Date        Address Dettails       Department    
> Monthly income
> bsdcbasdb hbvabfv  12-12-09 12/2 main street        snbvsivnsvn           
> 121646.00
>                                               City - bvauisdbc        
> oihbvisudfnv   
>                                               Pin code- 1100154

How is the data put into the text file? Is it delimited? -If so you can 
use the Import From File wizard and specify how to parse the data into 
columns.

Since you've posted here, I assume you want to do this using VBA in 
which case we need to know how the data is set up in the text file. Can 
you post a sample of the first 2 lines of the file?

Garry


0
GS
5/10/2010 3:39:43 PM
This can be done, usually relatively easily, with VBA (a macro).  But I would 
need a sample of the actual text file to work from.  

I realize that personal information would be in the file, if you can accept 
that I would treat it as sensitive and confidential information, then send me 
a copy of a text file (or even 2 of them) to (remove spaces)
Help From @ JLathamSite .com 
and I'll create the code needed to import the data into an Excel workbook.

Remind me of this discussion, either by link or by your name as posted here.


"Radhakant Panigrahi" wrote:

> Hi,
> 
> Can anybody can help me in in formatting the below data for me
> The below data is coming in a txt file and i need the data in a excel file
> 
> However when i put in excel i am not getting any structured form
> I need the Reference mentioned against the numeric value in the separate 
> column as heading and the data below should come below the heading. I  have 
> tried, but i have to a lot of manual edit after formatting.
> 
> 1.Emplyoee name
> bsdcbasdb hbvabfvas
> 2.Date 
> 12-12-09
> 3.Address Dettails
> 12/2 main street
> City - bvauisdbc
> 
> Pin code- 1100154
> 4. Department
> snbvsivnsvn
> oihbvisudfnv
> 5. Monthly income
> 121646.00
> 
> structured format
> Emplyoee name          Date        Address Dettails       Department    
> Monthly income
> bsdcbasdb hbvabfv  12-12-09 12/2 main street        snbvsivnsvn           
> 121646.00
>                                               City - bvauisdbc        
> oihbvisudfnv   
>                                               Pin code- 1100154
0
Utf
5/10/2010 3:50:01 PM
I'm assuming the data is somewhat similar to what he showed in the original 
posting, but since there are some obvious typos and perhaps an added blank 
line, I asked for the source .txt files.  Besides, it would be good to see it 
all just in case records with missing information are handled/provided in 
some unique layout.

I think you'd be safer asking for 2 or 3 employee records rather than just 
the 1st 2 lines - just in case it does come across much as provided in the OP.

"GS" wrote:

> Radhakant Panigrahi wrote on 5/10/2010 :
> > Hi,
> >
> > Can anybody can help me in in formatting the below data for me
> > The below data is coming in a txt file and i need the data in a excel file
> >
> > However when i put in excel i am not getting any structured form
> > I need the Reference mentioned against the numeric value in the separate 
> > column as heading and the data below should come below the heading. I  have 
> > tried, but i have to a lot of manual edit after formatting.
> >
> > 1.Emplyoee name
> > bsdcbasdb hbvabfvas
> > 2.Date 
> > 12-12-09
> > 3.Address Dettails
> > 12/2 main street
> > City - bvauisdbc
> >
> > Pin code- 1100154
> > 4. Department
> > snbvsivnsvn
> > oihbvisudfnv
> > 5. Monthly income
> > 121646.00
> >
> > structured format
> > Emplyoee name          Date        Address Dettails       Department    
> > Monthly income
> > bsdcbasdb hbvabfv  12-12-09 12/2 main street        snbvsivnsvn           
> > 121646.00
> >                                               City - bvauisdbc        
> > oihbvisudfnv   
> >                                               Pin code- 1100154
> 
> How is the data put into the text file? Is it delimited? -If so you can 
> use the Import From File wizard and specify how to parse the data into 
> columns.
> 
> Since you've posted here, I assume you want to do this using VBA in 
> which case we need to know how the data is set up in the text file. Can 
> you post a sample of the first 2 lines of the file?
> 
> Garry
> 
> 
> .
> 
0
Utf
5/10/2010 7:09:01 PM
JLatham used his keyboard to write :
> I'm assuming the data is somewhat similar to what he showed in the original 
> posting, but since there are some obvious typos and perhaps an added blank 
> line, I asked for the source .txt files.  Besides, it would be good to see it 
> all just in case records with missing information are handled/provided in 
> some unique layout.
>
> I think you'd be safer asking for 2 or 3 employee records rather than just 
> the 1st 2 lines - just in case it does come across much as provided in the 
> OP.

Good point. The OP should use fake names, though, as I don't expect too 
many enterprises allow divulging proprietary data much these days. 
(Email is not a secure transfer; they don't know us; etc.)

I've seen this before and so only require a sample of the "expected" 
data format since any unexpected or corrupt data is usually to be 
disgarded. There's numerous ways to validate contents in a text file 
line by line, especially if it's a delimited file with the predefined 
fieldnames in the first line. If missing, it can be appended easily if 
need be but this isn't really necessary as long as we know what they 
should be. What I'm looking for is to determine whether to use string 
parsing techniques with or without ADO.

Garry
--

>
> "GS" wrote:
>
>> Radhakant Panigrahi wrote on 5/10/2010 :
>>> Hi,
>>> 
>>> Can anybody can help me in in formatting the below data for me
>>> The below data is coming in a txt file and i need the data in a excel file
>>> 
>>> However when i put in excel i am not getting any structured form
>>> I need the Reference mentioned against the numeric value in the separate 
>>> column as heading and the data below should come below the heading. I  have 
>>> tried, but i have to a lot of manual edit after formatting.
>>> 
>>> 1.Emplyoee name
>>> bsdcbasdb hbvabfvas
>>> 2.Date 
>>> 12-12-09
>>> 3.Address Dettails
>>> 12/2 main street
>>> City - bvauisdbc
>>> 
>>> Pin code- 1100154
>>> 4. Department
>>> snbvsivnsvn
>>> oihbvisudfnv
>>> 5. Monthly income
>>> 121646.00
>>> 
>>> structured format
>>> Emplyoee name          Date        Address Dettails       Department    
>>> Monthly income
>>> bsdcbasdb hbvabfv  12-12-09 12/2 main street        snbvsivnsvn           
>>> 121646.00
>>>                                               City - bvauisdbc        
>>> oihbvisudfnv   
>>>                                               Pin code- 1100154
>> 
>> How is the data put into the text file? Is it delimited? -If so you can 
>> use the Import From File wizard and specify how to parse the data into 
>> columns.
>> 
>> Since you've posted here, I assume you want to do this using VBA in 
>> which case we need to know how the data is set up in the text file. Can 
>> you post a sample of the first 2 lines of the file?
>> 
>> Garry
>> 
>> 
>> .
>>


0
GS
5/10/2010 8:31:47 PM
Reply:

Similar Artilces:

Date format issue when submitting from a userform to a spreadsheet
Hi, I have a userform that I've generated which routes dates onto a spreadsheet based on the users input. I am having a bit of a frustrating time with the dates, it would appear that in the process of moving the date from the userform to the spreadsheet some dates are switched/transposed. I'll give an example. If someone enters 09/02/2004 on the userform excel seems to look at 09 and assume it is a month and transposes the dates to 02/09/2004(this does not appear to be a US/UK format issues as I have already gone down that road). However, if the date 13/09/2004 is entered i...

Exporting file names to an excel spreadsheet.
I have a folder containing many many many .pdf files. Is there a way to export the filenames of these .pdf files into an excel spreadsheet? If this is a dumb question, I apologize. I didnt have any luck searching for the answer here. -- Kepf ------------------------------------------------------------------------ Kepf's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30611 View this thread: http://www.excelforum.com/showthread.php?threadid=547520 I use Jim Cone's fine Add-in called "ListFiles"for this sort of thing. It's available free (a...

How to get XML data out of an XML file
I am trying to retrieve the Parameters first or second (0, 1 ,2) node from the following XML file: <?xml version="1.0" encoding="utf-8" ?> <Robot xmlns="http://tempuri.org/RobotDefaults.xsd"> <Parameters> <Name>Decker</Name> </Parameters> <Parameters> <Name>A</Name> </Parameters> <Parameters> <Name>B</Name> </Parameters> </Robot> There will be more data than just a name for each Parameters node. Here is my code: Dim node As XmlNode = xmlDocument.SelectSingleNode("/P...

Publisher file made in Publisher 2007 won't open in 2007
I produced an 8.5 x 11 brochure two days ago in Publisher 2007. I was able to save, resave and reopen the file many times during the day. When I tried to open the file today, I get the "Publisher cannot open the file" error message. I've tried to open the file on two different machines with Publisher 2007 and get the error message both time. One has XP Pro, the other has Visa Home Basic. It's a 1.6 meg file. I have a smaller publisher file of a bumper sticker (40 kb) which was made a couple of weeks ago which opens with no problem. This is the second time I ha...

Multiple PST Files #2
I am running Outlook 2003 and would like to have Outlook use two different .pst files (one for my work stuff and one for home) on the same computer. Is it possible to do this? If so, can I can I configure one of the pst files to get e-mail from one account, while the other pst file is configured to get mail from the other account? Thanks! -D Yes, you can create multiple PSTs. I keep mine stored in the same file location but with different names. Depending on which version of Outlook you run, you can creat a new pst from file/new/Outlook Data File (I run Outlook 2003 but had multiple P...

Money 2006 file repair application error
I cannot delete an old account because I get a "file may be courrupt" error so I am trying to repair my 2006 file. Following the deirections, when the progress bar almost completes, I get an application exception and send an error report to MS. My event log has 2 app errors 1) Event Type: Error Event Source: Application Error Event Category: None Event ID: 1001 Date: 4/12/2006 Time: 10:47:26 PM User: N/A Computer: xxx Description: Fault bucket 02266399. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 42 75 63 6b 65 ...

Custom cell formatting
I need to create a custom format for a series of cells that will begin like this. I can't figure out what the code character is fora volitile potentially alpha character. Can anyone help me?? -Monica, Dallas 000000 000001 000002 .... 000009 00000A 00000B 000010 000011 ...... Monica something like this might work for you but you'll need to put all the leading digits in for the entry with the alpha character Regards Trevor "MDavison" <davison@fr.com> wrote in message news:#SD0tUzTEHA.1652@TK2MSFTNGP09.phx.gbl... > I need to create a custom format for a series ...

Auto formatting features: How do I align page numbers in publicati
I've got a problem with my publication. I can't align even page numbers to the left without automatic moving the odd numbers to the left as well? Can someone help me? Cissy99 wrote: > I've got a problem with my publication. I can't align even page numbers to > the left without automatic moving the odd numbers to the left as well? Can > someone help me? You need to create a two-page master rather than a one-page master. What version of Publisher are you running? -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org ...

Application hanging on file load...
Okay, I'm having the strangest problem, and I'm hoping somebody here will be able to give me an idea of how to attack it... I have an MFC application that does some networked communication, multi-threading, fun stuff... I also load and save xml configuration files. Now, on most of the computers I've run my software on, I have absolutely no problems. On SOME boxes, however, whenever I use my menu to try to load or save a file... before the File Dialog box even comes up... the application hangs. All the boxes I've tried this on have been Windows 2000 boxes with Service Pack 4....

can't open files
I have Microsoft Office 2003 ~ all of a sudden when I go to my documents and try to open a file, I get this message "problem sending command to the program". Error 0646 and dt000 See the article "How to re-register Word when problems crop up opening files” at: http://www.word.mvps.org/FAQs/AppErrors/ReRegisterWord.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Lost in Vegas" <Lo...

how to turn off automatic format in Excel?
Hi Excel automatically change the first character in a cell to be uppercase. I just want lowercase. How can I turn off this function? Thanks Ngoc Hi Go to Tools / Autocorrect and uncheck Capitalize first letter of sentence. Andy. "ngoc" <linh@chello.no> wrote in message news:BOKNb.271$O41.819@amstwist00... > Hi > Excel automatically change the first character in a cell to be > uppercase. I just want lowercase. How can I turn off this function? > Thanks > Ngoc > ...

Formatting
I've always used MS Word as my email editor in Outlook. Is this possible in Live Mail. Nope. I'm afraid that's only possible using Outlook. In WLM you have to use the built in editor. Is there anything in particular that's lacking from the built in editor that you're looking for? Colin Brown WL MVP "jrchambe" <jrchambe@discussions.microsoft.com> wrote in message news:5EC21892-D39F-4219-AB0F-47BC14E1CD36@microsoft.com... > I've always used MS Word as my email editor in Outlook. Is this possible > in > Live Mail. "...

I can no longer convert my files to pdf
I have Publisher 2003 and yesterday, my pdf menu on the top left disappeared and I can no longer convert my Publisher files to pdf. I've even uninstalled/reinstalled the Adobe Acrobat 7 and have also updated to 7.8 but still no luck. The next step was to uninstall and reinstall Publisher and still no luck. Any one know what may be the problem? Thanks. How are you trying to convert your files? When happens when you try? -- JoAnn Paules MVP Microsoft [Publisher] "darrellm" <darrellm@discussions.microsoft.com> wrote in message news:A78B7B52-981D-4FB7-8625-EAD9...

Outlook Data Files #4
I've done some reading but I'm still confused about the use of Office Outlook Personal Folders File (.pst) versus Outlook 97-2002 Personal Folders File (.pst). I understand the basic "Office Outlook Personal Folders File (.pst) to create a new Outlook 2003 .pst file. Click Outlook 97-2002 Personal Folders File (.pst) to create a new Outlook .pst file that is compatible with earlier versions of Outlook." When we have upgraded to Outlook 2003 or set up a new PC with Outlook 2003, when adding PST's you can chosse either of the two file type options and browse to chos...

Formatting Cells in Excel 97
Hi Guys, Sorry if I sound real stupid but is there anyway that we can control the column formatting in Excel 97 like let's say column A = GENERAL(6), column B = GENERAL(4), column C = TEXT(18) etc? Appreciate any form of advice, thanks!! I replied in the programming group. Are you seeking a programming answer? It's usually best to only post to one group, and include the remark "Please tell me if I should ask this in another group." On Thu, 28 Aug 2003 00:56:47 -0700, "Daryl" <daryl.ho@tnt.com> wrote: >Hi Guys, > >Sorry if I sound real stupid b...

Backup Excel file
I want to take backup of a file every time. I am using - save as - tools - general option - always create back up. The backup file is in the same location but I want to put it in a different folder. What should I do, kindly suggest. Thanks Jan Karel Pieterse's has an addin called AutoSafe (note spelling). http://www.jkp-ads.com/Download.htm (look for AutoSafe.zip, not autosafeVBE.zip, for your purposes.) It doesn't overwrite the existing workbook when it saves. It saves to a user selectable folder. And when it's done, it either deletes these backups (or puts them...

Utility (pref. script) to catalog .EDB files
Hi, I have a client that is using an Enterprise backup tool which, whilst able to back-up and restore, does not provide in-depth information like traditional Exchange-aware backup products. I have been asked to write a script to list the users in a flat .EDB file (which has been snapped and copied and flushed using SAN replication tools). I have taken a look at the ESE API, which can only be accessed using C + (I only use VB). Other than EXMERGE, does anyone know of any tools that allow you to list the basic mailbox details on a EDB file? Thanks, Hutton. ...

format a CD
Hi, how can I format a cd+rw re writeable disc aga ...

List folders to file
Hi Does anyone have a macro that would list all the folders (with path) and subfolders to an excel sheet but not the files? Thanks Shona Shona- There's a function called CELL() that should return your filename (or any of a number of parameters) but I can't get it to work properly on my machine, so I can't make it work for you. The syntax is =CELL("filename") which ought to return the path and filename of the current file, and which you could then trim down to show just the path. Can anyone provide some guidance here? Dave, If it isn't working for you, it pro...

Hyperlink File Help
I am needing some major help. I have a file with hyperlinks in column F that link to a file on our server. I am needing to test to see if the file exists and if it does, copy the file to a folder in my documents called (CapturedFiles) and if it doesn't format the cell color to red. Can VBA do this and if so how? Any help would be greatly appreciated. Thanks in advance. Fileserver or webserver ? Tim On Nov 23, 7:20=A0am, Aaron <Aa...@discussions.microsoft.com> wrote: > I am needing some major help. =A0I have a file with hyperlinks in column = F that > l...

IMPORTING MONEY FILES DUP ENTRIES
I have been unable to run money98 files in money2003.Tried importing files but all tranfers between accounts are duplicated. Don't understand how to import all the accounts at once. I created new accounts in 2003 and imported one by one, but any transactions between accounts is duplicated. Follow the prompts on the import file dialog that tell you to select multiple files to import at the same time. There are other guidelines if investment accounts are involved. You might want to review postings on this subject in the group archives at http://groups.google.com. "JAYNE" &l...

Lost .pst files
I am using Office XP with Outlook 2002 (SP2). I recently had a boot track failure on my old computer which had 2 hard drives, using the second drive as back-up storage. I bought a new computer and installed the old main drive (the one with the failed boot track) in my new computer as a second drive and copied all the data onto the new main drive. All data and software works except Outlook. I cannot find any .pst files on my old drive. Where could they be. BTW I use Matadore as a spam blocker. In article <014e01c3462e$561cbdf0$a101280a@phx.gbl>, daddyray01 @sport.rr.com say...

Read file info using SMO locks database!
Hi! I'm using SMO from C# to restore a database from a backup file. Since I want to re-use the same datafiles I try to read the datafiles in my destination database and call RelocateFile to use these filenames during the restore. Everyting works fine except when I try to read the current datafilenames (see code below). If I skip this code and just hardcode the paths in relocatefile everything works fine. Database db = svr.Databases[destinationDBName]; foreach (FileGroup group in db.FileGroups) foreach (DataFile file in group.Files) Console.WriteLine...

Remove format link?
Is there a way to remove the format link between fields in Modifier? Help just shows how to set it and the usual stuff doesn't seem to be working. ...

Hyperlink To JPG File
I have added a hyperlink to a jpg (photo) file, and when i select the hyperlink, the jpg file opens in Corel Photo-Paint. Is there a way that I can force it to open with Windows Photo and Fax Viewer, Instead. Thanks GW Open Windows Explorer and find a *.jpg file. Select it and right-click and "Open With" Make Windows Photo and Fax Viewer the default "always open with". If you get an error, you may have to open Corel Photo-Paint and disassociate *.jpg files using probably some Options setting. If neither of these steps work for you, in Windows Explorer>Tools>...