Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Excel file to an ASCII file. 1

Status
Not open for further replies.

Davefeet

Technical User
Jan 24, 2002
212
US
I have to make an ASCII file to submitt to the IRS. I have all of the needed data in Excel. The IRS requires a certain format. Each field or column, in the ascii file, has to take up, lets say 40 spaces. So I made each field in excel have 40 spaces, which would include the cell text plus 40-(that cells number of characters) spaces. When I convert it to a ascII .txt file it shows spaces in between each coulmn. I don't want that. How would I take that excel file and make it an ascII file, so it just has the data not any spaces between the columns? I hope that is a clear question. Thanks Dave
 
Dave, not a 100% certain about what you are asking for. Can you clarify and/or send an example file to hasitbakhda@yahoo.co.uk and I'll try and help....
 
Why take the trouble to pad your data with spaces if you do not want them ?

If the IRS require 40 character width fields, then you have to have the spaces.

AC
 
I want spaces. The spaces I want are already in the excel file. But when I convert it to the ASCII file, between each column (I don’t know if text documents have real defined columns, but you know what I mean) there is one tab size space that the conversion process put in there. The spaces I want in the file are already accounted for in the excel file.

Hope that clarifies.
Dave
Salt Lake City Home of 2002 Winter Olympics
 
Dave,

Now I am confused. In the first entry you state "...so it just has the data not any spaces between the columns?" and in your last post, you state "I want spaces."

If you are doing a SAVE AS and then choosing txt, note that this enforces a tab delimited file (hence the tabes between your columns).

From what I understand, you have already got spaces in the Excel file, and when you convert it to a text file, you don't want any spaces between the columns.

If thats the case, have you tried saving the file as a CSV file? The CSV file is essentially a text file, or even a PRN file (all from the SAVE AS menu).

This should address what I *think* you are asking for.
 
The IRS wont accept CSV. What I'm going to do is import the file into to access, and from there export it the way I want. I think that should work.

Sorry guys for all of the confusion, it is kinda of hard to explain.


Salt Lake City Home of 2002 Winter Olympics
 
Dave,

Try the PRN file format. It may be OK for the IRS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top