Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Thanked 0 Times in 0 Posts

    Convert to Text File (Excel2000)

    I have an Excel Workbook that I save as a .txt file on a weekly basis. This week when I saved the .txt file it converted some of my numbers to dates. The numbers it converted have a hyphen example: 03-12225. These same types of number have been in this file for a couple of years but this is the first time it has converted them to dates. I have tried multiplying the numbers by 1, placing a single quote in front of the number (in the final version the field needs to be text), and specifying the column to be text when opening the .txt file in Excel and still the data is converted to a date. Another odd thing is not every field with type of number (with the hyphen) is converted to a date. Any ideas? Thank you

  2. #2
    5 Star Lounger
    Join Date
    Oct 2002
    Wellington, Wellington, New Zealand
    Thanked 0 Times in 0 Posts

    Re: Convert to Text File (Excel2000)

    It rather depends on what you want.

    I do not believe that the export to txt will have converted to dates - almost certainly, the dates will appear as a conversion when you re-import them again into a spreadsheet. You could prove this by using notepad or Word to look at the exported text file. So long as you do not have to re-read the file in Excel you will have no issues.

    If you could avoid using the hyphen and use something else instead - e.g. a tilde ~ or an underscore _ you would have absolutely no problems with date confusion. If you MUST use hyphens then it is a case of making sure that they cannot be interpretted as dates ever.

    I'm unsure of your application - in particular what application needs to USE the .txt file. If it were possible to save the data as an Excel sheet and simply export a .txt file each week you'd also have no problems.

    In summary, the issue probably appears when you read the file into Excel - nothing you've described so far says that reading a text file into Excel is necessary - I'm assuming that an alternate application or presentation requires it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts