Exporting Excel Data into Notepad

D

devender_g

Dear All,

Is it possible to export excel data into Notepad?

Or is it possible to open a notepad file inside a macro and paste exce
contents into that file?

Any help will be appreciated..

Thanks
De
 
O

\(:][OZDOC1050][:\)

Hi Dev,
One way it can be done, change the save as to suit your needs.
Regards
Pete

Sub TEXT1()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets("TEXT").Select
Sheets("TEXT").Copy
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Administrator\Desktop\MYTEXT.txt",
FileFormat:= _
xlUnicodeText, CreateBackup:=False
ActiveWindow.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
 
N

NickHK

devender,
You can save an Excel worksheet as tab or comma separated that you can open
in NotePad.
Depending on the layout and requirements, you may get something useful or
garbage.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top