Excel data into Word

Microsoft Excel 2003 (full product)
September 4, 2010 at 08:35:35
Specs: Windows
Does anybody know how to convert an Excel data file into Word so that there are no spaces between columns (a way that is easier than find-replace the empty space). So, say Excel was this:

1 4 6
3 5 7

I would want Word like this:

See More: Excel data into Word

Report •

September 5, 2010 at 14:46:51
I am assuming that the data in Excel is in separate columns. e.g. A1, B1 and C1.

In D1, enter =A1&B1&C1 which will give you 123

Copy and Paste that into Word.

Hope that helps.

Report •

September 6, 2010 at 05:11:40

This is a short macro that is a modification of one I use to remove line breaks when copying and pasting from Adobe Acrobat documents.
This macro removes spaces and Tab characters.

In Word, click Alt+f11 (the Alt key and function key #11 pressed together)
This opens the Visual basic Window.
On the left side in the Project Explorer pane find 'Normal'
(If the 'Project Explorer' pane is not visible, from the menu bar select 'View' and 'Project Explorer')
Right-click on 'Normal' and select 'Insert >' and select 'Module' (not Class Module)
Double click the new module name - typically Module1
In the large Visual Basic window paste the following:

Sub Paste_NoSpace()
' Routine to take text on clipboard
' and remove any spaces or tab characters.
' The resulting text is pasted,
' without formatting, to the insertion point

Dim objData As New DataObject
Dim strThisChar As String
Dim strIn As String
Dim strOut As String
Dim n As Integer
'get the text from the clipboard
strIn = objData.GetText
'parse the text spaces and Tab characters
For n = 1 To Len(strIn)
    strThisChar = Mid(strIn, n, 1)
    If Asc(strThisChar) <> 32 And Asc(strThisChar) <> 9 Then
        'make new text without any spaces/tabs
        strOut = strOut & strThisChar
    End If

'insert the new text after the insertion point, deleting any selected text
Selection.InsertBefore Text:=strOut
End Sub

From the Visual Basic menu Click File - Save Normal.
Use Alt + f11 to return to the main Word window.
Right-click on a toolbar and select 'Customize' (at the bottom of the list)
In the Customize dialog box select the 'Commands' tab and from the 'Categories:' section on the left, scroll down and click on 'Macros'
On the right under 'Commands:' find and select 'Normal.Module1.Paste_NoSpace'
Hold the left mouse button down and drag it to a suitable position on a toolbar.
Right click the new item on the toolbar and select 'Text Only (in Menus)'
Right-click again and change the name to something meaningful.
Finally right-click and select either 'Edit button image...' or 'Change button image >' and either draw or select an icon.
Click 'Close' on the 'Customize' dialog box.
Now select and copy cells in Excel. Return to Word, place the cursor where required in the document and click the new icon to paste the cell contents without spaces or tabs.


Report •

September 8, 2010 at 09:09:37
Thanks for the help!

Report •

Related Solutions

Ask Question