Can't find my tables!

Ok, I had this working in my dev environment then I published to the test environment and it stopped working.

I have 17 tables in my word doc template and I am looping through them inserting a “check” into a specific cell in a specific row. This was working perfectly… and now it isn’t.

Why or why is this happening???

Private Sub SetChartCheckbox(ByVal oDoc As Aspose.Words.Document, ByVal iTable As Int16, ByVal iCell As Int16)
    Dim oRun As New Aspose.Words.Run(oDoc, "ü")
    Dim oPrgph As New Aspose.Words.Paragraph(oDoc)
    Dim oTable As Aspose.Words.Tables.Table

    oRun.Font.Bold = True
    oRun.Font.Name = "Wingdings"

    oTable = oDoc.Sections(1).Body.Tables(iTable - 1)

    If Not oTable Is Nothing Then '- This is where it is failing on test... for some reason this table isn't there anymore.
        '- zero based ;)
        oPrgph.Runs.Add(oRun)
        oTable.Rows(1).Cells(iCell - 1).AppendChild(oPrgph)
    Else
        Throw New Exception("This shouldn't happen")
    End If

End Sub

Dear Customer,

Thank you for your inquiry.

Most likely the reason you are running the above issue you did not apply your licence for test envirnoment. Evaluation mode has some limitations and one is document truncating. What is why you got a less number of tables your document really contains.
Try to apply your licence for test mode. It should resolved your problem. Otherwise we will continue our investigations.

We actually just renewed our license within the last few weeks and we haven’t been in test mode in 2yrs.

What other reasons are there that would cause the exact same code & exact same word doc not function the same in two environments? Does a local install MS Office affect it? Does ASPOSE need to be installed differently? Anything else?

Maybe in my original post, when I put in the comments “test”, I should have been more clear and said “test server” (not test configuration).

Thank you for additional information.

Before continue further investigation may I ask you to check a couple things:

  1. How many tables does the input document you use on the test server contain? To check this just use the following code fragment:
NodeCollection tables = doc.GetChildNodes(NodeType.Table, true);
System.Console.WriteLine(tables.Count);
  1. Try to save your input .docx document as output .docx on the test server and then check input and output documents have no one difference.
  2. And we can be absolutely sure you use exactly the same input document for both dev and test servers, right?

On Test server: 17 tables… I compiled the site, copied straight to integration server… 0 tables.

I copied the entire site (deleting the old one which included the report templates folder… so I triple checked that the exact same doc is being used). There’s no issues with the Aspose object cacheing docs is there? I mean, I doubt it, but I had to ask…

Actually, I just did the other thing you suggested… saving the input doc (without trying to populate the tables)… and it’s as if the Aspose object is still the previous version. My tables ARE there… all 17 of them, but I have an image inserted into each of them and it is gone now. The reason we upgraded to the newest object was because it included a fix for saving included images.

What can I do resolve this “cached” Aspose object issue?

Hi
Thanks for your request. Please try deleting ASP.NET temporary files. Maybe this helps. ASP.NET temporary files are by default in “C:\WINDOWS\Microsoft.NET\Framework{Framework version}\Temporary ASP.NET Files{Application Name}”.
Also, try removing reference to Aspose.Words from your application and then add it again and rebuild the application.
Best regards,

Bad news… i did both of those things and I still get no tables when I try this…

Dim oTables As Aspose.Words.NodeCollection = oDoc.GetChildNodes(Aspose.Words.NodeType.Table, True)

oTables.Count = 0 when I run this. I don’t know what else to try. I deleted the existing web folder on the integration server, rebuilt it on test and copied it over. No dice!

Is there anything else I can provide you besides server access?

Hi

Thank you for additional information. Could you please create a simple application that will allow us to reproduce the problem? Also please attach the output document produced on your server, this will allow us to check which version of Aspose.Words is used on the server.
Best regards,