Excel to Notepad automatically

spycein

Board Regular
Joined
Mar 8, 2014
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hello Every One,
I am looking for a automatic process to copy a range of data from excel and paste it in notepad and save as a xml file.
My have maintained my data is as follows

In Cell A1 =" Available fruits today"
In Cell A2=" Thank you"

in Cell C1: = Fruit Name (its a dynamic named range)

Fruits Name
Apple
Banana
Orange
Pineapple


I am try to to copy above data in notepad as follows

Available Fruits today
Apple
Banana
Orange
Pineapple
Thank You


Also want to save the notepad file as xml format.

Many thanks in advance.

Best Regards,

Shib
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Have you just tried to save it out of Excel using the XML Data format option, then opening it up in NotePad?
(NotePad is just a text editor program - there is no such thing as a "NotePad" file, just text and XML files you can open using NotePad, or any other text editor program).
 
Upvote 0
Have you just tried to save it out of Excel using the XML Data format option, then opening it up in NotePad?
(NotePad is just a text editor program - there is no such thing as a "NotePad" file, just text and XML files you can open using NotePad, or any other text editor program).
Thank you so much for your reply.
i have other data in that workbook and want to save the specific range as a new file in xml format.
 
Upvote 0
i have other data in that workbook and want to save the specific range as a new file in xml format.
You can still do it.
One easy way is to open up a new blank workbook, copy the data you wish to write to the XML file to that workbook, save as XML, and then close it.
 
Upvote 0
i want to make the process automatic through a macro enabled button
 
Upvote 0
i want to make the process automatic through a macro enabled button
You can do all the things I listed in a Macro.
You can make Excel give you a lot of the code you need to do this by turning on your Macro Recorder, and record yourself doing this manually.
Once done, stop the Recorder and view your code. You can then clean it up (most of the literal "Select" statements aren't necessary and can be combined with the line below them), and make the code more dynamic.

Give that a try, and then if you need any help cleaning up the code or making it dynamic, post it here and let us know which part you are having trouble with, and we can help you clean it up.
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,982
Members
449,276
Latest member
surendra75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top