private void Form1_Load(object sender, EventArgs e)
{
FarPoint.Win.Spread.DrawingSpace.RectangleShape shape1 = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
shape1.Name = "abc1";
shape1.Size = new Size(40, 40);
shape1.Location = new Point(70, 50);
fpSpread1.ActiveSheet.AddShape(shape1);
fpSpread1.ActiveSheet.Columns[1].Visible = false;
}
private void button1_Click(object sender, EventArgs e)
{
// シェイプオブジェクトを取得と削除
FarPoint.Win.Spread.DrawingSpace.PSShape ps;
ps = fpSpread1.ActiveSheet.GetShape("abc1");
fpSpread1.ActiveSheet.RemoveShape("abc1");
// Excelエクスポート
fpSpread1.SaveExcel("..\\..\\Book1.xls");
// シェイプオブジェクトを再設定
fpSpread1.ActiveSheet.AddShape(ps);
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim shape1 As New FarPoint.Win.Spread.DrawingSpace.RectangleShape()
shape1.Name = "abc1"
shape1.Size = New Size(40, 40)
shape1.Location = New Point(70, 50)
FpSpread1.ActiveSheet.AddShape(shape1)
FpSpread1.ActiveSheet.Columns(1).Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' シェイプオブジェクトを取得と削除
Dim ps As FarPoint.Win.Spread.DrawingSpace.PSShape
ps = FpSpread1.ActiveSheet.GetShape("abc1")
FpSpread1.ActiveSheet.RemoveShape("abc1")
' Excelエクスポート
FpSpread1.SaveExcel("..\..\Book1.xls")
' シェイプオブジェクトを再設定
FpSpread1.ActiveSheet.AddShape(ps)
End Sub