वहाँ एक तरीका है कि कैसे मैं aspose शब्द में एक टेबल की पीढ़ी के बाद कोड के माध्यम से कुछ कस्टम फॉर्मेटिंग लागू कर सकता हूं?
उत्तर:
जवाब के लिए 0 № 1आप Word दस्तावेज़ की वांछित तालिका तक पहुँच सकते हैं और तालिका, पंक्ति और कक्ष में स्वरूपण लागू करें। दस्तावेज़ की पहली तालिका को प्रारूपित करने के लिए कृपया कोड स्निपेट की जांच करें।
मैं डेवलपर इवेंजलिस्ट के रूप में असोस के साथ काम करता हूं।
com.aspose.words.Document doc = new com.aspose.words.Document("input.doc");
com.aspose.words.Table table = (com.aspose.words.Table) doc.getChild(NodeType.TABLE, 0, true);
// Align the table to the center of the page.
table.setAlignment(TableAlignment.CENTER);
// Clear any existing borders from the table.
table.clearBorders();
// Set a green border around the table but not inside.
table.setBorder(BorderType.LEFT, LineStyle.SINGLE, 1.5, Color.GREEN, true);
table.setBorder(BorderType.RIGHT, LineStyle.SINGLE, 1.5, Color.GREEN, true);
table.setBorder(BorderType.TOP, LineStyle.SINGLE, 1.5, Color.GREEN, true);
table.setBorder(BorderType.BOTTOM, LineStyle.SINGLE, 1.5, Color.GREEN, true);
// Fill the cells with a light green solid color.
table.setShading(TextureIndex.TEXTURE_SOLID, Color.GREEN, Color.GREEN);
doc.save("Table.SetOutlineBorders_Out.doc");