Hi,
If you can use vba here is a routine to replace spaces in the header row
or column of the msgraph data sheet. If the text contains multiple
spaces you might want to pick a special character, such as ^, and insert
that in the text before running the code.
Sub x()
'
' Replace space in axis label with new line
'
Dim lngRow As Long
Dim lngCol As Long
With ActiveWindow.Selection.ShapeRange.OLEFormat.Object
With .Application
If .PlotBy = xlRows Then
lngCol = 2
For lngCol = 2 To _
..Chart.SeriesCollection(1).Points.Count + 1
.DataSheet.Cells(1, lngCol).Value = _
Replace(.DataSheet.Cells(1, lngCol).Value, _
" ", vbCrLf)
Next
Else
lngRow = 2
For lngRow = 2 To _
.Chart.SeriesCollection(1).Points.Count + 1
.DataSheet.Cells(lngRow, 1).Value = _
Replace(.DataSheet.Cells(lngRow, 1).Value, _
" ", vbCrLf)
Next
End If
.Update
.Quit
End With
End With
End Sub
Another possible option, depending on chart type, is to use data labels
as axis labels. You can then manually edit the data labels and add new
lines.
Cheers
Andy