始めるにはこれで十分です。目的に合わせて変更する必要がありますが、これにより、使用する必要があるプロパティが紹介されます。
「エクスポートされた」データをどのように構造化するかは、最終的にはあなた次第です。関数を使用してワークシートに書き出す方法の例を示しApplication.Transpose
ますが、必要に応じてその部分を変更する必要があります。
Sub DebugChartData()
Dim cht As ChartObject
Dim srs As Series
Dim lTrim#, rTrim#
Dim xValAddress As String
For Each cht In ActiveSheet.ChartObjects '## iterate over all charts in the active sheet
For Each srs In cht.Chart.SeriesCollection '## iterate over all series in each chart
'## The following given only to illustrate some of
' the properties available which you might find useful
' You will want to print these out to a worksheet, presumably,
' but I don't know how you intend to arrange these, on what
' sheet, etc, so I will leave that part up to you :)
Debug.Print srs.Name
Debug.Print vbTab & srs.Formula '# probably not so useful to you but I include it anyways.
'## You could parse the formula...
lTrim = InStrRev(srs.Formula, ",", InStrRev(srs.Formula, ",") - 1, vbBinaryCompare) + 1
rTrim = InStrRev(srs.Formula, ",")
xValAddress = Mid(srs.Formula, lTrim, rTrim - lTrim)
Debug.Print vbTab & xValAddress
'## , but that hardly seems necessary. You could convert the array of
' values/xvalues in to a delimited string and then do a text-to-columns on the data
Debug.Print vbTab & Join(srs.XValues, vbTab)
Debug.Print vbTab & Join(srs.Values, vbTab)
'## Or, you could use Application.Transpose to write out on a worksheet
'Qualify this with the appropriate Destination sheet, also make the destination variable
' as you accommodate multiple series/charts worth of data.
Range("A1").Resize(UBound(srs.XValues)) = Application.Transpose(srs.Values)
Next
Next
End Sub