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

Free Support Forum - aspose.com

Dynamic Table growth

Hello all,

So far using dynamic tables is great when we tie it with returned rows from a SQL query. I have a problem when a long string of text is being placed into a table though. Here’s the text:

181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248

For some reason, the dynamic table won’t grow downwards to accommodate the size of the text. Is there a setting I need to turn on with the Document builder object I’m currently using?

Thanks.

Hi

Thank you for your interest in Aspose.Words. You should specify width of cell and set FitText property to true. For example see the following code.

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertCell();

builder.CellFormat.Width = 100;

builder.CellFormat.FitText = true;

builder.Write("181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248");

builder.EndRow();

builder.EndTable();

doc.Save(@"327_101075_cjchang\out.doc");

I hope that this will help you to solve your problem.

Best regards.