Skip to content

How to draw an line-arrow?(如何画直线箭头) NPOI-V2.6.1 #1167

Answered by SummerCSharp
SummerCSharp asked this question in Q&A
Discussion options

You must be logged in to vote

I have found a solution.

void AddArrow(HSSFSimpleShape shape)
{
Type type = shape.GetType();
MethodInfo methodInfo = type.GetMethod("SetPropertyValue", BindingFlags.Instance | BindingFlags.NonPublic);
if (methodInfo != null)
{
var escherSimpleProperty2 = new EscherSimpleProperty(EscherProperties.LINESTYLE__LINESTARTARROWHEAD, false, false, 0x01);
methodInfo.Invoke(shape, new object[] { escherSimpleProperty2 });
}
}

void AddArrowOverTurn(HSSFSimpleShape shape)
{
Type type = shape.GetType();
MethodInfo methodInfo = type.GetMethod("SetPropertyValue", BindingFlags.Instance | BindingFlags.NonPublic);
if (methodInfo != null)
{
var escherSimpleProperty2 = new EscherSimpleProperty(EscherPropertie…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tonyqus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant