Copy paste code into 1 cell

meg9696

New Member
Joined
Sep 10, 2015
Messages
12
Hello

Can anyone help me paste code into a single excel sheet?
I have googled and found various options but none that works for me. I am using excel for mac 2015.
Here is the piece of code for example that should appear in a single cell and with the formatting preserved if possible.
For some reason I cannot paste the below with the indents, I have even tried clip board but it does not preserve the indents that
I am trying to show below.
<line1>
<line 2="">For anyone coming from development world, I think you know how the code gets indented and basically that is what should appear in a single excel cell after I paste it. Any help much appreciated!
<line3><line3><line2><line1><match:uri.wildcard value="/*minitri.flg /*livetri.zip"><line 1="">
line 2
line3
line3/>
line 2/>
<line 1="">

</line></line></match:uri.wildcard></line1></line2></line3></line3></line></line1>
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I don't know if using a Mac makes a difference, but I just paste code after clicking into one cell one time, and it uses the same number of rows as the code is, and it indents them as well...

One other thought, try copying and pasting it into a word document, then copy it from there into an Excel doc, it gives you the option to keep source formatting at that time...
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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