|
- Sub L1()
- Dim oPresent As Presentation
- Dim Sld As Slide
- Dim Shp As Shape
- ''
- Dim Grp As Graph.Chart
- Dim gSht As Graph.DataSheet
- Dim gRng As Graph.Range, gRng2 As Graph.Range
- ''
- Dim Obj 'As CellRange
- Dim Sht As Worksheet
- Dim ShpRng As ShapeRange
- Dim Path, xlPathName, xlName As String
-
- Dim xlWk As Excel.Workbook
- Dim Rng As Excel.Range, Rng1 As Excel.Range, Rng2 As Excel.Range
-
-
- xlName = "\del.xls"
- Set oPresent = Application.ActivePresentation
- Path = oPresent.Application.ActivePresentation.Path
-
- Set xlWk = PptSetWk("\中国东西南北城市.xls")
- For Each Sht In xlWk.Sheets
- Debug.Print Sht.Name
- Next Sht
- Set Sht = xlWk.Sheets("图表数据")
- Debug.Print Sht.Cells(1, 1).Formula
- Debug.Print Sht.Cells(1, 1).Formula, Sht.Cells(2, 1).Formula, Sht.Cells(1, 2).Formula
- Stop
- Stop
- For Each Sld In oPresent.Slides
- For Each Shp In Sld.Shapes
- Set Grp = Shp.OLEFormat.Object
- Debug.Print Shp.Name, DataSheetDataSheet; Shp.OLEFormat.Object.Application.Name
- With Grp
- Debug.Print .Name, .Application.Name,
- Debug.Print .ChartType
- End With
- Set gSht = Shp.OLEFormat.Object.Application.DataSheet
- Set gRng2 = gSht.Cells(2, 2)
- Stop
- Next Shp
- Next Sld
- End Sub
复制代码 |
|