Author Topic: Excel text to Word problem  (Read 2046 times)

Excel text to Word problem
« on: 18 February, 2013, 02:55:34 pm »
I have an Excel file that contains text in a cell.
We use the Xl file to auto-populate a Word file.
There are two hard returns in the cell, required as the text following the hard return is to be on a new line.
However what I want is simply a soft return rather than a hard return, the soft return will show in Word as a new line rather than a new paragraph.
Anyone any ideas? Googling turned up nothing....

Re: Excel text to Word problem
« Reply #1 on: 18 February, 2013, 03:33:15 pm »
I don't have it installed to check on current version but we used to do exactly this in Office 2000/2003 or thereabouts as follows:

Create the text in Word first including the soft return(s) then copy that across to Excel, this will transfer the soft return character across into the cell. Even though Excel can't create its own for some reason it will preserve the soft return character and will still display it as a line break. When needed this will be copied back across into Word and work as you want it.

Once the text is in the Excel cell you can edit it within Excel, just be careful not to delete the return characters.

iddu

  • Are we there yet?
Re: Excel text to Word problem
« Reply #2 on: 18 February, 2013, 05:36:01 pm »
However what I want is simply a soft return rather than a hard return, the soft return will show in Word as a new line rather than a new paragraph.
Anyone any ideas? Googling turned up nothing....

Umm...Alt+Enter
I'd offer you some moral support - but I have questionable morals.

Re: Excel text to Word problem
« Reply #3 on: 18 February, 2013, 11:29:06 pm »
However what I want is simply a soft return rather than a hard return, the soft return will show in Word as a new line rather than a new paragraph.
Anyone any ideas? Googling turned up nothing....

Umm...Alt+Enter

Alt+Enter in Excel creates the hard return which shows in Word as a para return.

Trying to round-trip from Word to Excel and back again with text containing a line break (Shift+Enter in Word) doesn't work, as this breaks the text across cells when you paste into Excel.

Trying to paste in just the line break character doesn't work, and nor does trying to type in the ASCII code for a line break direct into the cell.

*But* using this in Word (where it seems to appear as white space, not a line break), then pasting it into Excel, works just fine - it breaks the text within the cell, then the text copies and pastes into Word with a line break.

So, at least in Office 2007, if you type some words, then ALT+010 on the numeric keypad, then some more words, you will get your words separated by white space. Select this white space (this is easiest if you have non-printing characters displayed, so you don't choose an actual spacebar-created space by mistake), and paste it into your Excel cell where you want the line break.

Finding a way to generate this character in a way that suits the actual workflow is left as an exercise for the reader ... (Assign to a key combination or a macro? Can you tell I've no idea?)

Jaded

  • The Codfather
  • Formerly known as Jaded
Re: Excel text to Word problem
« Reply #4 on: 18 February, 2013, 11:35:39 pm »
Take off and nuke the entire Excel file from orbit. It's the only way to be sure.
It is simpler than it looks.

Re: Excel text to Word problem
« Reply #5 on: 19 February, 2013, 08:34:17 am »
However what I want is simply a soft return rather than a hard return, the soft return will show in Word as a new line rather than a new paragraph.
Anyone any ideas? Googling turned up nothing....

Umm...Alt+Enter
Trying to round-trip from Word to Excel and back again with text containing a line break (Shift+Enter in Word) doesn't work, as this breaks the text across cells when you paste into Excel.
No it works fine. Don't paste the information into the formula bar, double click on the cell and paste directly into that.

Re: Excel text to Word problem
« Reply #6 on: 19 February, 2013, 11:11:36 am »
Thanks all, sorted this by changing the word template to have no para spacing, so even if the Xl file contains hard returns the Word file will simply show the text as a new line rather than the new para it actually is.  I'll try the suggestions though, as this will crop up again I suspect. I appreciate your time and efforts.

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Excel text to Word problem
« Reply #7 on: 19 February, 2013, 01:54:25 pm »
That's what I would have done but I thought   Specializta's   suggestion looked more fit for purpose.
when you're dead you're done, so let the good times roll

iddu

  • Are we there yet?
Re: Excel text to Word problem
« Reply #8 on: 19 February, 2013, 01:57:59 pm »
Alt+Enter in Excel creates the hard return which shows in Word as a para return.

Not in this 'ere 2003 install it don't.

(tappity tap)...nor in Windows 2003/Office 2007 - I've just spun up a VM and tried it in realtime.

[Edit: indeed - use the cell as target, never the formula barstrike that, works fine in formula bar content as well...]
I'd offer you some moral support - but I have questionable morals.

Re: Excel text to Word problem
« Reply #9 on: 19 February, 2013, 02:42:09 pm »
In Office 2007 Alt + Enter works fine to get a soft return so long as you're doing it in the cell and not the formula bar.

So if you're using an up to date Office no need for my Word -> Excel and back again, just double click inside the cell, enter your text and just Alt+Enter every time you want a soft return.

Re: Excel text to Word problem
« Reply #10 on: 19 February, 2013, 05:52:32 pm »
Trying to round-trip from Word to Excel and back again with text containing a line break (Shift+Enter in Word) doesn't work, as this breaks the text across cells when you paste into Excel.
No it works fine. Don't paste the information into the formula bar, double click on the cell and paste directly into that.

Other way round, at least on my version of Office 2k ... paste it into the formula bar and it's fine, paste it into the cell and it breaks across cells.

Ah. Single click on the cell, paste, and it breaks. Double click on the cell, paste, and it's fine.

In Office 2007 Alt + Enter works fine to get a soft return so long as you're doing it in the cell and not the formula bar.

So if you're using an up to date Office no need for my Word -> Excel and back again, just double click inside the cell, enter your text and just Alt+Enter every time you want a soft return.

Yes, this is fine in Excel (the Word->Excel bit is a red herring) - but it gives you a paragraph break not a line break when you then go Excel->Word.

Thanks all, sorted this by changing the word template to have no para spacing, so even if the Xl file contains hard returns the Word file will simply show the text as a new line rather than the new para it actually is. 

Works fine for printing, but annoys people like me who view onscreen with non-printing characters turned on, and presumably also means that if folk are entering other text in Word, they need Return-Return for it to appear to be a new para when printed.

Re: Excel text to Word problem
« Reply #11 on: 19 February, 2013, 06:05:45 pm »
Yes, this is fine in Excel (the Word->Excel bit is a red herring) - but it gives you a paragraph break not a line break when you then go Excel->Word.
Not on mine it doesn't, it copies hard/soft returns from Excel to Word without making changes.