我需要按以下方式在 Excel 中显示 Axapta 的输出。
请协助。
我在我的基础 Excel 类中添加了以下方法,并且能够获得解决方案。
public void setCellProperty(int _r1, int _c1,int _r2, int _c2,
int _orientation = 0,
int _horizontalAlignment = 1,
int _verticalAlignment = 1,
boolean _wrapText = False,
boolean _addIndent = False,
int _indentLevel = 0,
boolean _shrinkToFit = False,
int _readingOrder = 0,
boolean _mergeCells = False)
{
COM cell1,cell2;
str range;
;
cell1 = null;
cell2 = null;
cell1 = worksheet.cells();
this.variant2COM(cell1, cell1.item(_r1,_c1));
cell2 = worksheet.cells();
this.variant2COM(cell2, cell2.item(_r2,_c2));
range =strfmt("%1:%2",cell1.address(),cell2.address());
cellRange =worksheet.Range(range);
cellRange.Mergecells(_mergeCells);
cellRange.IndentLevel(_indentLevel);
cellRange.AddIndent(_addIndent);
cellRange.Orientation(_orientation);
cellRange.VerticalAlignment(_verticalAlignment);
cellRange.HorizontalAlignment(_horizontalAlignment);
}
变量_orientation
决定倾斜度,对于上述情况,通过orientation=90