• Convert to Text File (Excel2000)

    Author
    Topic
    #404946

    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

    Viewing 1 reply thread
    Author
    Replies
    • #827452

      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.

    • #827453

      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.

    Viewing 1 reply thread
    Reply To: Convert to Text File (Excel2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: