Stop Excel 2010 from appending .txt to file with existing extension

Page 1 of 2 12 LastLast

  1. Posts : 3
    windows 7 64 bit
       #1

    Stop Excel 2010 from appending .txt to file with existing extension


    I think this problem may have to do with Windows 7 vs Windows XP. With Excel 2010 running under XP this does not happen.

    Under Win 7 running Excel 2010, when saving a spreadsheet as a tab delimited text file (.txt). Excel 2010 appends the .txt file extension to a file that already has an existing file extension. For my work I must save excel files as xxxxxxx.upl but excel always saves the files as xxxxxxx.upl.txt. This only occurs under Win 7, not XP which is why I think it is an OS issue.

    How can I fix this? I am guessing it is a registry fix, but I don't have any ideas of how to fix it. Thanks in advance for any suggestions!

    If I add double quotes around the file name I want, like "xxxxxx.upl" the file will save as a tab delimited text file and Excel will then identify the file type as a UPL file.

    What I want:



    What I get without the "xxxx.upl" file name:

    Attached Thumbnails Attached Thumbnails Stop Excel 2010 from appending .txt to file with existing extension-upl-file-example.png  
      My Computer


  2. Posts : 934
    Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
       #2

    Yep, that option is called "Hide extensions for known file types".
    Likely, on your XP system it is turned ON (checked) and on your win 7 machine is it turned OFF (unchecked).
    But that would work for all known file types, not just the one specified.

    Tutorial File Extensions - Hide or Show
      My Computer


  3. Posts : 3
    windows 7 64 bit
    Thread Starter
       #3

    Neutron,
    Thanks for the reply. I checked the settings and in both XP and Win 7 the "Hide extensions for known file types" is unchecked for both but the .txt is not appended in the XP (xyz.upl), but it is appended in Win 7 (xyz.upl.txt). In each case I select "Text (Tab delimited) (*.txt)" as the "Save as type:" under the "File name:" field. The file association table also shows the .upl file is to be opened with Notepad. Perhaps I need to try a notepad clone to see if that makes a difference.
      My Computer


  4. Posts : 934
    Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
       #4

    Okay. I get it now. Yes, that is an OS feature. I remember similar issue was discussed sometime ago on this forum.
    How OS handles and "sees" files has been modified since Windows XP.

    I am not aware of any easy solutions.

    I only can think of ugly 3rd party combo solution:
    To setup 3rd party program to monitor a specific folder. When any txt file is saved into this specific folder then it will be renamed into upl file.
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    I would suggest scripting the insertion of the quotes and the file name. The script file attached to the post might do what you want. Ironically, you must manually remove the ".txt" part of the file name


    You will need AutoIt3 to make use of the script. You can read more about how to use the attached file below the second video in this post:
    SysTray Icons of some programs don't re-appear after Explorer restart


    The script file attached to the post:
    waits for the Save As window (with Tab delimited text) to appear
    gets the title of the most recently active Excel window
    inserts the name of the file with quotes
    waits for you to click on the Save button
    ...if the file already exists...
    ......the script handles the warning to overwrite the file
    the script also handles the warning that you get about feature loss
    then the script loops back to wait for the next Save As window.


    In the video below, the script is slowed down to let you see the windows that it handles. I start the script a second time using the speed that you would probably use. You can leave the script running as long as you wish. It just waits around for the applicable Save As window to appear.

    Personally, I would not compile the script. Just run it as a text file. If the script does not handle a window as expected, then exit the script and complete the task manually. Restart the script.

    You might want to watch this at 720p and in the full screen mode.
    Stop Excel 2010 from appending .txt to file with existing extension Attached Files
      My Computer


  6. Posts : 5,941
    Linux CENTOS 7 / various Windows OS'es and servers
       #6

    Hi there
    I think you just have to save the file in the format you want excel drop down as save as file type - and then after closing the file simply rename it with windows explorer -- seems simple to me or have I mis-understood something.

    Here's Excel running in an XP Virtual machine -- From what I see the EXCEL program appends the file type depending on values entered from the drop down on file type. I don't see any change in W7 to the way it was working in XP.

    Cheers
    jimbo
    Attached Thumbnails Attached Thumbnails Stop Excel 2010 from appending .txt to file with existing extension-.png  
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    Jimbo45,

    Please try these steps in XP with Office 2010:

    1) Create a text file on your desktop
    2) use notepad to put in one word
    3) press tab and enter a second word
    4) save the file
    5) rename the file TAB.UPL
    6) drag and drop it into excel 2010
    7) now do a File > Save As

    Two things will be different:
    The field named File name: will already have the file name
    The txt file extension will NOT be appended to the existing file name.
    The saved file will be TAB.UPL (as desired).

    Now try those same steps using Office 2010 on W7.
    The field named File name: will be empty???
    The txt file extension WILL be appended to any file name that you type in
    (unless you wrap the file name in quotation marks)
    The saved file will be TAB.UPL.TXT

    On a bad day, I have to enter more than 100 such file names with quotation marks.
    On a good day, I only have to do this a couple of dozen times
    This is one W7 annoyance that I could live without at work.

    Here is Office 2010 on XP:
    Stop Excel 2010 from appending .txt to file with existing extension-xp-office-2010.png
      My Computer


  8. Posts : 10,485
    W7 Pro SP1 64bit
       #8

    stones710 said:
    ...How can I fix this? I am guessing it is a registry fix, but I don't have any ideas of how to fix it. Thanks in advance for any suggestions!....
    I've watched Excel via Process Monitor during a file save operation and I could not find any place in the registry where it gets the info for what it offers as a file extension. I had hoped to add entries that would duplicate the tab delimited option and use the extension letters that I need... but no joy. Maybe someone else can ferret out where that info comes from.
      My Computer


  9. Posts : 10,485
    W7 Pro SP1 64bit
       #9

    @stones710,
    Did you find a solution that worked for you?
      My Computer


  10. Posts : 4,161
    Windows 7 Pro-x64
       #10

    All the OP has to do is select Save As then change the file type to cvs. The drop-down on the right will list the file types allowed.
    Attached Thumbnails Attached Thumbnails Stop Excel 2010 from appending .txt to file with existing extension-excel-save-.jpg  
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:48.
Find Us