我正在尝试使用 SoftArtisans 'ExcelApplication
和.Anchor
Shape
我可以让形状出现在我的输出文件中;但是,我要求 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
.