Export a table to .txt without hyphens & pipes?

AtLarge

Registered User.
Local time
Today, 06:29
Joined
Oct 15, 2008
Messages
70
I am running into a couple problems at the same time and could use some suggestions:

  • I need to export a table to .txt
  • I need to have the field names as well as the records
  • Some records are part numbers with a leading zero like 043095
  • Some records are part numbers with dashes and alpha's like 123456E-789
  • I don't think I can use .csv because some records have a part number description uses comma's like "some text, more text, even more text"
  • I don't need all the hyphens and pipes for the grid work
The problems I have so far are:
  1. Exporting to .txt without formatting doesn't bring over the field names (I know they made it this way) Is there a work around other than exporting the data and then adding all the field names in with a macro in Excel? I can do it but, what a pain.
  2. I see dropping of leading zeros = 43095 in .txt and .xlsx
  3. Exporting to Excel sometimes scrambles the part numbers and they come out like this 5.91E-09 when it should be 123456E-789 (so I'm losing data)
  4. Exporting to Excel also puts qoutes in the description field like "A very large part" (extra clean up necessary)
:banghead:

Could someone tell me the easiest way to get rid of the hyphens and pipes and leave it in .txt form? All four encoding types do the same thing.

Any idea why exporting to Excel would scramble some of the part numbers like my examples above?

TIA
 
Thanks Pat. I was able to figure it out. When exporting I was always using the checkbox "Export data with formatting and layout" at the beginning.

  1. Leave that checkbox blank, browse for your path and file name, then click Ok
  2. Radio button "Delimited" and Next
  3. Radio button Tab
  4. Checkbox "Include Field Names on the first Row" and Next
  5. Then finish
You get the .txt file with the field names and none of the hyphens or pipes. Also, all the leading zeroes and combination part numbers are intact.

Yay! :)

Your right about Excel of course and I knew that, it just wasn't clear to me why it was happening and I think it's because the person passing me the data wasn't exporting it right because of the aforementioned problems.

Now I can instruct him on the proper way as .txt and import it to my database and know it's right the first time. :cool:
 

Users who are viewing this thread

Back
Top Bottom