Exporting Excel Data into Notepad

  • Thread starter Thread starter devender_g
  • Start date Start date
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
 
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
 
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
 
Back
Top