1

I need to display the output from Axapta in Excel in the following manner. Excel View

Kindly assist.

piku
  • 471
  • 4
  • 12
  • 44

2 Answers2

2

I have added the following method in my base Excel Class and am able to get the solution.

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);
}

the variable _orientation decides the inclination, for the case above pass orientation=90

piku
  • 471
  • 4
  • 12
  • 44
0

See this blog on how to export to Excel.

"Rotate a text" is a text formatting option, others are struggling too. It boils down to whether there is a Excel API, which do that.

Sorry, I can't help you futher.

Community
  • 1
  • 1
Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50