Solved

Formatting and aligning a text file into an Excel or Access file

Posted on 2013-10-31
2
296 Views
Last Modified: 2013-11-01
Hi Guys, I recieve a Daily text file. Can someone show me how to export it to Excel or Access with the data columns in line? I enclose an attachment
GBO-Dashboard-Report.txt
0
Comment
Question by:Justincut
2 Comments
 
LVL 10

Accepted Solution

by:
mark_harris231 earned 500 total points
Comment Utility
In Excel, you can import a text file:

- Select Data tab > From Text
- Select text file to import from saved location
- Select Delimited
- Select Tab and Comma as the delimiters
- Click Finish

This appears to work fairly well in terms of preserving column alignment, at least until the bottom sections (i.e., Bond Events for Reprocessing and New Branch/Instrument Type Combo).  Unless you have some control over the output format, these would require some manual manipulation.  If you can add commas to the end of the headers and values in each column of the original file, this method will do a better job of aligning the columns in Excel.

Note that this method does result in a significant number of cells with leading spaces.  You can use the TRIM() function to clean these up, or you could try this free utility to do this en masse:

Trim Worksheet
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Your text files seems to contain data from different "tables"
(all with different fields and datatypes.)
- N  O  N     V  A  L  I  D  A  T  E  D      T  R  A  D  E  S / E  V  E  N  T  S  - [D E T A I L S]
- T  R  A  D  E  S    W  I  T  H     N  O     M   T   M
-  C  A  S  H  F  L  O  W      S   T   A   T   U   S
-  R   E   Q   U   E   S    T            S   T   A   T   U   S
...etc
(There is also Header info for each of the "Tables")

Therefore there will be no simple way to import this one file (into Excel or Access) and create all the needed "tables"

What you need to do is go back to the creator of this textfile, and ask that you be given instead, one file for each 'table' (data structure)

From there it looks this the data is comma delimited and can be imported into Access or Excel fairly easily

JeffCoachman
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now