Free Support Forum - aspose.com

Support table styles in Aspose.Words

Styles

Can I use table styles in Aspose.Words?

No, table styles are not supported in Aspose.Words. This feature will be implemented in one of the future releases.

Any estimate on when to support table styles?

Hello yong,

Thanks for considering Aspose.

Since the query is related to Aspose.Words, so I am moving this thread to Aspose.Words forum. Our team of experts there would be pleased to acknowledge your query.

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

Thanks for your request. Unfortunately, Table styles are still not supported. This is the issue #5262 in our defect database. Currently, I cannot provide you any reliable estimate regarding this issue. Hopefully, table styles will be supported somewhere in this year.

Best regards.

Thanks for a prompt response.

Another issue with Words Java package: How to make two tables independent from each others? It seems that " builder.startTable() and builder.endTable()" is not really separating them (table columns are tied up). And builder.insertParagraph() will separate them, but is there any other way to make two tables totally separated?

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

Thanks for your inquiry. Unfortunately, this is only way to separate two tables. This is the known issue #1160 in our defect database. This issue should be first fixed in .NET version and then ported to Java. I will notify you as soon as it is resolved.

Best regards.

builder.insertParagraph(); could not separate two tables’ column alignment.
Please see my attached docx file. It’s very important for us to have separate tables in one page.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getRowFormat().clearFormatting();
builder.getRowFormat().getBorders().setLineWidth(2);
builder.getRowFormat().setLeftIndent(0);

builder.startTable();
for(int t=0;t<2;t++){
builder.insertCell();
builder.write(“Header”+t+":");
builder.insertCell();
builder.write(“value”);
}

builder.endRow();
for(int t=0;t<2;t++){
builder.insertCell();
builder.write(“Header”+t+":");
builder.insertCell();
builder.write(“value”);
}

builder.endRow();
for(int t=0;t<2;t++){
builder.insertCell();
builder.write(“Header”+t+":");
builder.insertCell();
builder.write(“value”);
}

builder.endRow();

builder.endTable();
builder.getRowFormat().clearFormatting();
builder.getCellFormat().clearFormatting();

builder.insertParagraph();


builder.startTable();
for(int t=0;t<5;t++){
builder.insertCell();
builder.getRowFormat().setHeadingFormat(true);
builder.getCellFormat().setWrapText(false);
builder.write(“Header Header Header”+t);
}

builder.endRow();

for(int t=0;t<5;t++){
// builder.getCellFormat().getShading().setBackgroundPatternColor(Color.lightGray);
builder.insertCell();
builder.getRowFormat().setHeadingFormat(false);
builder.write(“value”);
}
builder.endRow();
builder.endTable();
builder.insertParagraph();
for(int j=0;j<5;j++){
builder.getRowFormat().clearFormatting();
// builder.getRowFormat().getBorders().setLineWidth(2);
builder.startTable();
builder.getRowFormat().setLeftIndent(20);
for(int t1=0;t1<6;t1++){
builder.insertCell();
builder.write(“Header”+t1);
}
builder.endRow();
// builder.getCellFormat().getShading().setBackgroundPatternColor(Color.lightGray);
for(int t=0;t<6;t++){
builder.insertCell();
builder.write(“value”);
}
builder.endRow();
for(int t=0;t<6;t++){
builder.insertCell();
builder.write(“value”);
}
builder.endRow();
for(int t=0;t<6;t++){
builder.insertCell();
builder.write(“value”);
}
builder.endRow();
builder.endTable();
builder.insertParagraph();
}

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

Thanks for your request. I am not sure what you mean. However, maybe you should use AllowAutoFit option as shown in the following code:

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

builder.getRowFormat().clearFormatting();

builder.getRowFormat().getBorders().setLineWidth(2);

builder.getRowFormat().setLeftIndent(0);

//Build first table

builder.startTable();

for (int i = 0; i < 3; i++)

{

for (int t = 0; t < 2; t++)

{

builder.insertCell();

builder.write("Header" + t + ":");

builder.insertCell();

builder.write("value");

}

builder.endRow();

}

builder.endTable();

builder.getRowFormat().clearFormatting();

builder.getCellFormat().clearFormatting();

builder.insertParagraph();

//Build second table

builder.startTable();

builder.getRowFormat().setHeadingFormat(true);

builder.getRowFormat().setAllowAutoFit(true);

for (int t = 0; t < 5; t++)

{

builder.insertCell();

builder.getCellFormat().setWrapText(false);

builder.write("Header Header Header" + t);

}

builder.endRow();

for (int t = 0; t < 5; t++)

{

builder.insertCell();

builder.getRowFormat().setHeadingFormat(false);

builder.write("value");

}

builder.endRow();

builder.endTable();

Also, please attach the document that will show me what expected output is.

Best regards.

The issues you have found earlier (filed as 5262) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(11)

The issues you have found earlier (filed as WORDSNET-792) have been fixed in this .NET update and in this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(2)