我认为这是我第一次问到这样的论坛,但是让我试一下,因为我确实必须完成我的论文。
我用23个问题进行了调查。有三组人回答了调查,现在我在excel表中保存了数据: enter image description here
现在,我想为每个问题做一个深潜幻灯片(enter image description here),在此我可以比较不同小组的回答方式。我已经尽力用来自excel的数据填充幻灯片的内容,但是我一直坚持让图表选择它们的数据。因此,我将每个关系图所需的所有数据都放在一行中,我只需要为每个数据系列手动选择数据,这样就可以节省数小时来了解如何自动进行此操作。我遇到了SetSourceData方法,但无法使其正常工作。甚至没有提到我必须为图表提供不同的数据系列。
非常感谢您的帮助:)
还可以找到到目前为止我使用过的代码:
Sub CreateSlides()
'Open the Excel workbook. Change the filename here.
Dim OWB As New Excel.Workbook
Set OWB = Excel.Application.Workbooks.Open("C:\Users\jonas\Desktop\My Cloud Offline-Dateien\MC Documents\Uni\Bachelorarbeit\Workshop mit Case Study\Auswertung\191104_Auswertung Workshop Survey_v0.3.xlsb")
'Grab the first Worksheet in the Workbook
Dim WS As Excel.Worksheet
Set WS = OWB.Worksheets(1)
'Loop through each used row in Column A
For i = 1 To WS.Range("A65536").End(xlUp).Row
'Copy the first slide and paste at the end of the presentation
'ActivePresentation.Slides(1).Copy
'ActivePresentation.Slides.Paste (ActivePresentation.Slides.Count + 1)
'Change the text of the first text box on the slide.
'M1
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(43).TextFrame.TextRange.Text = WS.Cells(i, 1).Value
'Fragetext
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(4).TextFrame.TextRange.Text = WS.Cells(i, 2).Value
'Testgruppe: n
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(8).TextFrame.TextRange.Text = "n = " & WS.Cells(i, 24).Value
'Testgruppe: µ
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(9).TextFrame.TextRange.Text = "µ = " & WS.Cells(i, 3).Value
'Testgruppe: sigma ChrW(963)
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(10).TextFrame.TextRange.Text = ChrW(963) & " = " & WS.Cells(i, 9).Value
'Testgruppe: d vs Kontroll
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(12).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 12).Value
'Testgruppe Effekt vs Kontroll
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(13).TextFrame.TextRange.Text = WS.Cells(i, 13).Value
'Testgruppe d vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(15).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 14).Value
'Testgruppe Effekt vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(16).TextFrame.TextRange.Text = WS.Cells(i, 15).Value
'Kontrollgruppe: n
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(19).TextFrame.TextRange.Text = "n = " & WS.Cells(i, 25).Value
'Kontrollgruppe: µ
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(20).TextFrame.TextRange.Text = "µ = " & WS.Cells(i, 4).Value
'Testgruppe: sigma ChrW(963)
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(21).TextFrame.TextRange.Text = ChrW(963) & " = " & WS.Cells(i, 10).Value
'Testgruppe: d vs Test
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(23).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 18).Value
'Testgruppe Effekt vs Kontroll
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(24).TextFrame.TextRange.Text = WS.Cells(i, 19).Value
'Testgruppe d vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(26).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 16).Value
'Testgruppe Effekt vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(27).TextFrame.TextRange.Text = WS.Cells(i, 17).Value
'Experten: n
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(30).TextFrame.TextRange.Text = "n = " & WS.Cells(i, 26).Value
'Expertengruppe: µ
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(31).TextFrame.TextRange.Text = "µ = " & WS.Cells(i, 5).Value
'Testgruppe: sigma ChrW(963)
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(32).TextFrame.TextRange.Text = ChrW(963) & " = " & WS.Cells(i, 11).Value
'Testgruppe: d vs Test
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(34).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 20).Value
'Testgruppe Effekt vs Kontroll
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(35).TextFrame.TextRange.Text = WS.Cells(i, 21).Value
'Testgruppe d vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(37).TextFrame.TextRange.Text = "d = " & WS.Cells(i, 22).Value
'Testgruppe Effekt vs Experten
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(38).TextFrame.TextRange.Text = WS.Cells(i, 23).Value
Next
End Sub