Ist eine Möglichkeit, Formel in Tabelle mit Aspose Word Java API hinzuzufügen. Ich habe einen Code geschrieben, um eine Gesamtreihe zu generieren, aber ich suche nach der Inhaltskontrolle für die Formel.Wie man FieldFormula in die Zelle mit Hilfe von aspose-Wort in Java hinzufügt
Ich fand API FieldFormula, dieses Feld API. Können wir Feld in Zelle hinzufügen?
private void prepareAggregateRow(Table table, Row headerRow, Map<String, WsAttribute> attrValueMap, List<Attribute> attrDefs) throws Exception{
Row totalRow = (Row)headerRow.deepClone(true);
for (Attribute attribute : attrDefs) {
WsAttribute wsAttribute = attrValueMap.get(attribute.getName());
Cell cell = totalRow.getCells().get(attribute.getIdx());
Run run = (Run)cell.getChild(NodeType.RUN, 0,true);
if(wsAttribute!=null && wsAttribute.getValue()!=null) {
run.setText(wsAttribute.getValue());
} else {
run.setText("");
}
}
table.appendChild(totalRow);
}
Es scheint zu sein Aspose.Words Problem nicht Aspose.Cells. Bitte entfernen Sie das Aspose.Cells-Tag und fügen Sie das Aspose.Words-Tag hinzu, damit die Aspose.Words-Community Ihnen bei der Lösung dieses Problems helfen kann. Vielen Dank. – shakeel