C# 为什么NPOI excel文本框共享相同的文本值?

C# 为什么NPOI excel文本框共享相同的文本值?,c#,.net,excel,apache-poi,npoi,C#,.net,Excel,Apache Poi,Npoi,我在excel工作表中创建了3个不同的文本框 XSSFDrawing drawing = (XSSFDrawing)activeWorkSheet.CreateDrawingPatriarch(); IClientAnchor anchor1= drawing.CreateAnchor(0, 0, 0, 0, left1, top1, right1, bottom1); IClientAnchor anchor2= drawing.CreateAnchor(0, 0, 0, 0, left

我在excel工作表中创建了3个不同的文本框

 XSSFDrawing drawing = (XSSFDrawing)activeWorkSheet.CreateDrawingPatriarch();
 IClientAnchor anchor1= drawing.CreateAnchor(0, 0, 0, 0, left1, top1, right1, bottom1);
 IClientAnchor anchor2= drawing.CreateAnchor(0, 0, 0, 0, left2, top2, right2, bottom2);
 IClientAnchor anchor3= drawing.CreateAnchor(0, 0, 0, 0, left3, top3, right3, bottom3);

XSSFTextBox textbox1= drawing.CreateTextbox(anchor1);
XSSFTextBox textbox2= drawing.CreateTextbox(anchor2);
XSSFTextBox textbox3= drawing.CreateTextbox(anchor3);
并使用以下方法设置其值:

textbox1.setTitle(title1);
textbox2.setTitle(title2);
textbox3.setTitle(title3);
我希望文本框中有不同的值,但在输出中,这些文本框共享相同的值,即最后给定的值。 如果未为textbox 3调用setTitle方法,则所有textbox共享textbox 2的值。 如果未为textbox 2和3调用setTitle方法,则所有textbox共享textbox 1的值。 即使这些文本框位于不同的工作表中,它们的内容(上次修改的内容)都有相同的值


那么,如何在excel工作表中设置具有唯一值的文本框呢?

XSSFTextBox.setTitle
?您正在使用哪个NPOI版本?@AxelRichter v2.2.1.0