Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Excel - 2003 - save a spreadsheet in a fixed column text format  (Read 3940 times)

0 Members and 1 Guest are viewing this topic.

BRIANH

    Topic Starter


    Rookie

    • Experience: Familiar
    • OS: Windows XP
    Excel - 2003 - save a spreadsheet in a fixed column text format
    « on: September 27, 2010, 07:53:27 AM »
    Try as I might, I can't seem to find a solution to my issue.  I have a spreadsheet and would like to save the spreadsheet date
    as text and have the data output as a fixed column width with no delimiters (like an implied table) . I've tried altering each column in the spreadsheet using data, text to columns..No luck. When I copy and paste the data into a txt doc. the data remains as delimited.
    The original input to the spreadsheet is in delimited format.

    Anyone have any ideas for this? 
    Thanks

    Salmon Trout

    • Guest
    Re: Excel - 2003 - save a spreadsheet in a fixed column text format
    « Reply #1 on: September 27, 2010, 11:05:48 AM »
    You can use Save As and choose "Text (MS-DOS) .txt" but you still have delimiters. I think you'd need a VBA macro such as the one in the spreadsheet on this page linked to here:

    http://www.databison.com/index.php/export-excel-as-fixed-width-text-file-format-using-vba/

    But I would prefer the time-honoured method of installing, as an additional printer, the "generic/text-only" printer and then, from the Excel print menu, choosing (1) that printer (2) checking the "Print to file" box, and (3) supplying a file name.

    The output will be a non-delimited text file. You may still have to do a bit of editing (e.g. in Notepad) but it gets you nearly there.



    Code: [Select]
    First Name   Surname   Date of birth Sex       Start Date
     John         Smith     01/01/1990    Male      02/02/2010
     Mary         Jones     02/02/1985    Female    05/05/2005
     Howard       Wilson    03/09/1980    Male      06/10/2001




    BRIANH

      Topic Starter


      Rookie

      • Experience: Familiar
      • OS: Windows XP
      Re: Excel - 2003 - save a spreadsheet in a fixed column text format
      « Reply #2 on: September 28, 2010, 11:40:39 AM »
      Thanks for the tips and suggestions.. I've not had experience with setting up a macro in EXCEL and thought I'd try the 'install a generic printer' option. It seemed to work for me, some editing but at the endo of the day.. I have a fixed width column report..

      thanks

      Salmon Trout

      • Guest
      Re: Excel - 2003 - save a spreadsheet in a fixed column text format
      « Reply #3 on: September 28, 2010, 11:52:36 AM »
      That spreadsheet I linked to is a ready made one that you can just use. Try it out.