Hello Shakeel Faiz,
Thanks
for the quick reply
Now I can
create table in .ppt and it is working fine but I need still your help.
I write a
code,
Dim pres As
Presentation = New Presentation("C:\\demo.ppt")
Dim slide As Slide =
pres.GetSlideByPosition(1)
Dim xPosition As Integer = 880
Dim yPosition As Integer = 600
Dim tableWidth As Integer = 4000
Dim tableHeight As Integer = 500
Dim columns As Integer = 4
Dim rows As Integer = 4
Dim borderWidth As Double = 2
Dim objDB As New DB
Dim ds As DataSet =
objDB.ReturnDataSet("select * from Jobs")
columns =
Convert.ToInt32(ds.Tables(0).Columns.Count)
rows =
Convert.ToInt32(ds.Tables(0).Rows.Count)
Dim table As Table =
slide.Shapes.AddTable(xPosition, yPosition, tableWidth, tableHeight, columns,
rows, borderWidth, Color.Blue)
If ds.Tables(0).Rows.Count > 0 Then
For r As Integer = 0 To
ds.Tables(0).Rows.Count - 1
For c As Integer = 0 To
ds.Tables(0).Columns.Count - 1
Dim tf As
Aspose.Slides.TextFrame = table.GetCell(c, r).TextFrame
If
tf IsNot Nothing
Then
tf.Paragraphs(0).Portions(0).Text = ds.Tables(0).Rows(r)("JobDesc").ToString()
End If
Next
Next
End If
pres.Write("C:\\report.ppt")
Note:
Point # 1: The problem is
I have more than 20 columns and more than 20 rows but it is not adjust on the
signle slide, how to split slide when slide is full? I mean data is large it
cannot adjust on single slide, I want when slide have no space then spare data
rows and columns set next slide.
Point # 2: How to remove “Evaluation
only. Created with Aspose.PowerPoint. Copyright 2004 Aspose Pty Ltd.” This backgraound
text?
Thanks,
Irfan Lateef