के साथ तालिका से टेक्स्ट में औचित्य मैं OpenXML के साथ तालिका में तालिका कक्ष में एक टेक्स्ट संरेखण लागू करना चाहता हूं।ओपनएक्सएमएल एसडीके 2.0
मुझे समझ में नहीं आता कि यह क्यों लागू नहीं है।
Table table = new Table();
TableRow tableHeader = new TableRow();
table.AppendChild<TableRow>(tableHeader);
TableCell tableCell = new TableCell();
tableHeader.AppendChild<TableCell>(tableCell);
Paragraph paragraph = new Paragraph(new Run(new Text("test")));
ParagraphProperties paragraphProperties = new ParagraphProperties();
JustificationValues? justification = GetJustificationFromString("centre");
if (justification != null)
{
paragraphProperties.AppendChild<Justification>(new Justification() { Val = justification });
}
paragraph.AppendChild<ParagraphProperties>(paragraphProperties);
tableCell.AppendChild<Paragraph>(paragraph);
public static JustificationValues? GetJustificationFromString(string alignment)
{
switch(alignment)
{
case "centre" : return JustificationValues.Center;
case "droite" : return JustificationValues.Right;
case "gauche" : return JustificationValues.Left;
default: return null;
}
}
Thx आपकी मदद के लिए!
ठीक लग रहा है, क्या आपने जस्टिफिकेशन वैल्यूज़ से इस प्रकार को बदलकर कोशिश की? JustificationValues – Kiru
मैंने इसे किया लेकिन कुछ भी नहीं बदलता – Aelios