0

我正在尝试使用 SoftArtisans 'ExcelApplication和.AnchorShape

我可以让形状出现在我的输出文件中;但是,我要求 Shape 中显示的文本必须从下到上阅读,即SHAPE必须显示为:

一个

H

小号

我正在使用以下代码在文件上创建形状,该代码存在于for循环中:

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

SoftArtisans 可以做到这一点吗?单独使用 Excel 时当然有可能,但是通过 API,我还没有找到与Shape.

4

1 回答 1

0

根据http://wiki.softartisans.com/display/EW9/Shape目前不支持此属性。但是 ExcelWriter 保留了大多数设置。是否可以在输入文件中设置文本旋转的形状,然后更改文本。

另一种选择,取决于形状,可能只是设置形状旋转http://wiki.softartisans.com/display/EW9/Shape.Rotation以便文本看起来向上阅读。

于 2015-12-24T03:30:56.917 回答