We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Why the sequence of rows doesn't match with the sequence of response write?


I want to new row to be added to the existing table with same order of the response write result. However, it seems to move the last record to the first. Please see part of my code below.

While objDataReader0.Read()

Dim SerialNumber As String = objDataReader0("SerialNumber")

Dim shortSN As String = Right(SerialNumber, 4)

Response.Write(SerialNumber & ",")

'add data to table

Dim tbl2 As TableEx = Nothing

'Iterate through the shapes and set a reference to the table found

For Each shptable As ShapeEx In sld1.Shapes

If TypeOf shptable Is TableEx Then

tbl2 = CType(shptable, TableEx)

End If

Next shptable

If SNnumber > 1 Then

Dim Rows As RowsEx = tbl2.Rows

Dim Row As RowEx = Rows(2)

' add new row at the end of the table

Rows.AddClone(Row, False)

For intIndex As Integer = 1 To objDataReader0.FieldCount - 1

tbl2(0, intIndex + 1).TextFrame.Text = SerialNumber


ElseIf SNnumber = 1 Then

tbl2(0, 2).TextFrame.Text = SerialNumber

End If

End While

Hi Jane,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I regret to share that I have not been completely able to understand the issue specified by you. Can you please share some further elaboration of the issue with me? The code snippet that you have shared is actually adding the cloned row at the end of table. If this is desirable then code snippet is working fine. However, if you are still feeling any issue then you may please use the following statement for cloning the rows. Please share the presentation as well mentioning what is desirable and what you are getting from Aspose.Slides for better understanding.

Rows.InsertClone(Rows.Count, Row, False)

Thanks and Regards,