0

I am attempting to create a diagram using SoftArtisans' ExcelApplication, Anchor and Shape.

I am able to get shapes to appear on my output file; however, I have a requirement that the text shown in the Shape must read bottom to top, i.e. SHAPE must be shown as:

E

P

A

H

S

I am creating my shapes on the file using the following code, which exists in a for loop:

if (prevRow != null && prevRow.FixtureY != pogPicDtl.FixtureY)
{
    currRow += 3;
    currCol = 0;
}

double prodX = (double)pogPicDtl.PositionX;
double prodY = (double)pogPicDtl.PositionY;

Shapes sheetShapes = wb.Worksheets[sheetNumber].Shapes;
Anchor anchor = wb.Worksheets[sheetNumber].CreateAnchor(currRow, currCol, prodX * .1, prodY );
Shape box = sheetShapes.CreateShape(ShapeType.Rectangle, anchor);

box.FillColor = blue;
box.FillTransparency = 0.50;
box.Height =(double) pogPicDtl.PositionHeight *10;
box.Width = (double)pogPicDtl.PositionWidth*10;

// I want this Text to read upw
box.Text = Math.Round(pogPicDtl.PositionX,0).ToString() + "," + Math.Round(pogPicDtl.PositionY,0).ToString();

Is this possible with SoftArtisans? It is certainly possible when using Excel just on its own, but through the API, I have yet to find the text orientation to be modifiable when it is relating to a Shape.

Nick
  • 882
  • 2
  • 9
  • 31

1 Answers1

0

According to http://wiki.softartisans.com/display/EW9/Shape this property is not currently supported. However ExcelWriter preserves most settings. Is it possible to have the shape with the text rotation already set in your input file, and just change the text.

Another option, depending on the shape, might be to just set shape rotation http://wiki.softartisans.com/display/EW9/Shape.Rotation so that the text appears to be read upwards.

Sam Plus Plus
  • 4,381
  • 2
  • 21
  • 43