TableFormat

Hi,

sorry if this is a double-post, I tried using the “Live Chat” option but it returned me to the text entry page after hitting “Send Message” so I don’t know if it was successful or not.

We intend to use teh Aspose.Words Java API to allow the business admins to provide a template .doc with a basic layout and with custom styles which we will apply to our generated documents. We will then read in the template file and apply the styles specified to elements as we write them to the generated .doc.

To clarify, we’relooking to call something like:

Document document = new Document("path/to/template");
Table table = new Table(document);
table.getTableFormat.setStyleName(document.getStyles.get("MyTableStyle"));
// add table to document
document.save("path/to/generated/file");

I’ve done some initial investigation and can retreive Paragraph styles and apply them to paragraphs generated on-the-fly. I’ve revieved the API and believe the same should be possible for Lists as well. However, the API doesn’t seem to support this for Tables. A forum post () appears to confirm this. Would someone be able to clarify what functionality TableFormat will provide when added (specifically, if it will allow something like the code snippet above)? Would you also be able to estimate when/if this functionality will be added?

Any help with this would be much appreciated,

Cheers,
Alasdair

Hi

Thanks for your request. TableFormat is still unavailable. I linked your request to the appropriate issue. You will be notified as soon as this feature is added. Unfortunately, I cannot provide you any reliable estimate regarding this feature at the moment.
Regarding functionality, TableFormat should allow to specify formation of the table, like table width, borders around the table, table style etc.
Best regards.

Thanks for the quick reply Alexey.

Am I correct in thinking this means there’s no method of getting the various components (Borders, Width etc) of a Table Style? Are there any known workarounds for this?

Cheers,
Alasdair

Hi

Thanks for your request. I think you can use the same technique as described here to work around the issue
Hope this helps.
Best regards.

Hi Alexey,

I can see how the linked post would allow me to set the properties of a Table. What we’re looking to do is a step before this, where we’d retrieve the properties of the Table from a Style of type “Table” created in Word. We’d then apply these properties to our dynamically created Table,

Cheers,
Alasdair

Hi

Thanks for your inquiry. This code just allows you to specify border around the table by using cell border. Unfortunately, there is no way to work with table format and table styles yet. Unfortunately, there is no workaround.
Best regards.

Hi Alexey,

thanks for the clarification,

Cheers,
Alasdair

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

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