Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Saving as .PRN (2K)

    I want to save a spreadsheet as PRN so that another application that expects fixed width columns can read it. I have used the following functions in various forms and combinations and cannot get the file to export 'correctly'.
    - change all text to a monospace font
    - autofit all columns
    - select the correct print area
    - scaled to fit all columns on one page
    - printed to Generic / Text printer - output to file
    The Generic printer doesn't work too well at all. I get tons of '###' in the columns, and adjusting, while allowing for successful previewing, doesn't give the right output in the file.

    The other functions also eventually allow successful preview don't work either. In general, even though the preview shows all columns on a page, the file produced shows columns up to a certain column all the time in the first half of the file's records, and then produce the 'page 2' (the overflow columns) on the remaining records.

    Can someone suggest something else that might produce what I want?

    Thanks.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving as .PRN (2K)

    First, see if the other application can handle .CSV as an input format. If it can, then that would probably be the easiest solution. Many applications that want a fixed field width file can also handle .CSV.

    If that didn't work, then I would write a VBA procedure to write the data directly into the file. That way, I would have complete control of the format of every data field. If you want some help doing that, then give us a description of the worksheet (upload a sample would be best), and a description of what the output file has to look like.
    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Jul 2001
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving as .PRN (2K)

    The suggestions offered are certainly possibilities, but is there a solution, or at least an explanation for the PRN truncation of columns?

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Saving as .PRN (2K)

    When you create a .PRN file, you are effectively printing through a printer driver into a file. For what you are doing, you are most likely using the generic print driver so that you do not get printer command language in the file. That driver is not very sophisticated. It is doing calculations of how many characters will fit in the columns of the mythical printer using a mythical font, and when it does not think that the data will fit, it replaces it with the #s.
    Legare Coleman

Posting Permissions

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