A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Import .prn file to Excel



 
 
Thread Tools Display Modes
  #1  
Old February 17th 04, 02:45 PM posted to microsoft.public.excel.programming
meme
external usenet poster
 
Posts: 13
Default Import .prn file to Excel

Hi,

I need import several .prn files to my Excel worksheet.
How should I program it in my VB code so all these .prn
files can be imported automatically ?
Any hints is very appreciate!!!!
Thank you very much
Meme
Ads
  #2  
Old February 17th 04, 04:06 PM posted to microsoft.public.excel.programming
Frank Kabel
external usenet poster
 
Posts: 3,885
Default Import .prn file to Excel

Hi
AFAIK you won't be able to import 'prn' files into Excel

--
Regards
Frank Kabel
Frankfurt, Germany

meme wrote:
> Hi,
>
> I need import several .prn files to my Excel worksheet.
> How should I program it in my VB code so all these .prn
> files can be imported automatically ?
> Any hints is very appreciate!!!!
> Thank you very much
> Meme

  #3  
Old February 17th 04, 04:37 PM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 27,285
Default Import .prn file to Excel

Just to add, if, as Dave Peterson pointed out in another post, if the .prn
file is generated with the generic Text print driver, then the prn file is
all text (or if it is otherwise all printable text) then you should be able
to open it in excel and get meaningful information. In that case, just use
the file open dialog and open it using the text import wizard.

--
Regards,
Tom Ogilvy

"Frank Kabel" > wrote in message
...
> Hi
> AFAIK you won't be able to import 'prn' files into Excel
>
> --
> Regards
> Frank Kabel
> Frankfurt, Germany
>
> meme wrote:
> > Hi,
> >
> > I need import several .prn files to my Excel worksheet.
> > How should I program it in my VB code so all these .prn
> > files can be imported automatically ?
> > Any hints is very appreciate!!!!
> > Thank you very much
> > Meme



  #4  
Old February 17th 04, 04:43 PM posted to microsoft.public.excel.programming
external usenet poster
 
Posts: n/a
Default Import .prn file to Excel

Then how about import .csv text file to Excel ?
Thank you
Meme
>-----Original Message-----
>Hi
>AFAIK you won't be able to import 'prn' files into Excel
>
>--
>Regards
>Frank Kabel
>Frankfurt, Germany
>
>meme wrote:
>> Hi,
>>
>> I need import several .prn files to my Excel worksheet.
>> How should I program it in my VB code so all these .prn
>> files can be imported automatically ?
>> Any hints is very appreciate!!!!
>> Thank you very much
>> Meme

>.
>

  #5  
Old February 17th 04, 04:49 PM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 27,285
Default Import .prn file to Excel

just do file => Open and select your file.

--
Regards,
Tom Ogilvy

> wrote in message
...
> Then how about import .csv text file to Excel ?
> Thank you
> Meme
> >-----Original Message-----
> >Hi
> >AFAIK you won't be able to import 'prn' files into Excel
> >
> >--
> >Regards
> >Frank Kabel
> >Frankfurt, Germany
> >
> >meme wrote:
> >> Hi,
> >>
> >> I need import several .prn files to my Excel worksheet.
> >> How should I program it in my VB code so all these .prn
> >> files can be imported automatically ?
> >> Any hints is very appreciate!!!!
> >> Thank you very much
> >> Meme

> >.
> >



  #6  
Old February 17th 04, 04:50 PM posted to microsoft.public.excel.programming
Frank Kabel
external usenet poster
 
Posts: 3,885
Default Import .prn file to Excel

Hi
just open the csv file. Excel will normally do the conversion. And also
have a look at Tom's post. Depending on the format of your *prn file
you may be able to open it.

--
Regards
Frank Kabel
Frankfurt, Germany

wrote:
> Then how about import .csv text file to Excel ?
> Thank you
> Meme
>> -----Original Message-----
>> Hi
>> AFAIK you won't be able to import 'prn' files into Excel
>>
>> --
>> Regards
>> Frank Kabel
>> Frankfurt, Germany
>>
>> meme wrote:
>>> Hi,
>>>
>>> I need import several .prn files to my Excel worksheet.
>>> How should I program it in my VB code so all these .prn
>>> files can be imported automatically ?
>>> Any hints is very appreciate!!!!
>>> Thank you very much
>>> Meme

>> .


  #7  
Old February 17th 04, 04:52 PM posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
 
Posts: 27,285
Default Import .prn file to Excel

Go automate it, turn on the macro recorder while you do it manually. Then
modify the basic code to get the result you want. To find the location
(bottom) of the last file brought in and placed in the consolidation
worksheet

set rng = ThisWorkbook.Worksheets("AllData").Cells(rows.coun t,1).End(xlup)

so you can open each file, then do

set rng = ThisWorkbook.Worksheets("AllData").Cells(rows.coun t,1).End(xlup)
Activeworkbook.Worksheets(1).Range("A1").CurrentRe gion.Copy _
rng.Offset(1,0)
ActiveWorkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


> wrote in message
...
> Then how about import .csv text file to Excel ?
> Thank you
> Meme
> >-----Original Message-----
> >Hi
> >AFAIK you won't be able to import 'prn' files into Excel
> >
> >--
> >Regards
> >Frank Kabel
> >Frankfurt, Germany
> >
> >meme wrote:
> >> Hi,
> >>
> >> I need import several .prn files to my Excel worksheet.
> >> How should I program it in my VB code so all these .prn
> >> files can be imported automatically ?
> >> Any hints is very appreciate!!!!
> >> Thank you very much
> >> Meme

> >.
> >



  #8  
Old February 18th 04, 02:51 AM posted to microsoft.public.excel.programming
Dave Peterson[_3_]
external usenet poster
 
Posts: 2,824
Default Import .prn file to Excel

And another way to get those printable text files with a .prn extension is just:
file|save As|save as type
Formatted Text (Space delimited)(*.prn)


Tom Ogilvy wrote:
>
> Just to add, if, as Dave Peterson pointed out in another post, if the .prn
> file is generated with the generic Text print driver, then the prn file is
> all text (or if it is otherwise all printable text) then you should be able
> to open it in excel and get meaningful information. In that case, just use
> the file open dialog and open it using the text import wizard.
>
> --
> Regards,
> Tom Ogilvy
>
> "Frank Kabel" > wrote in message
> ...
> > Hi
> > AFAIK you won't be able to import 'prn' files into Excel
> >
> > --
> > Regards
> > Frank Kabel
> > Frankfurt, Germany
> >
> > meme wrote:
> > > Hi,
> > >
> > > I need import several .prn files to my Excel worksheet.
> > > How should I program it in my VB code so all these .prn
> > > files can be imported automatically ?
> > > Any hints is very appreciate!!!!
> > > Thank you very much
> > > Meme


--

Dave Peterson

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I import text file of cash flow to excel file then use formula Bumpa Excel Discussion (Misc queries) 2 May 28th 10 04:22 PM
Import more than one .csv file into the same Excel file. Mary Ann Excel Discussion (Misc queries) 1 November 26th 09 11:12 AM
import file so that it is a actual csv file, no excel cell version broncoburt New Users to Excel 1 November 21st 09 09:09 PM
import data from txt file to an existing excel file shaji Excel Discussion (Misc queries) 1 September 12th 09 04:15 PM
How come I can't import an .svc file(Open Office) to Excel file? beezer Excel Discussion (Misc queries) 1 August 28th 06 12:05 AM


All times are GMT +1. The time now is 12:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.