Hi ,
i am trying to assign a value to a textbox form control in an Excel sheet but i am not able to do so, I have marked the line where i am trying to assign value to the Textbox control but i cant see any value assigned to the textbox even though debugging successfully. I am using Aspose.Cells in my Project reference.
Name of my textbox control is txtTestControl.
Here is my sample code
Aspose.Cells.Workbook xlWorkBooks;
Aspose.Cells.Worksheet xlWorkSheets;
xlWorkBooks = new Aspose.Cells.Workbook(sExternalFormPath);
xlWorkSheets = xlWorkBooks.Worksheets[“External form”];
foreach (Aspose.Cells.Drawing.Shape oShape in xlWorkSheets.Shapes)
{
if (oShape.Name.IndexOf(“txt”) != -1) // loop through all Textboxes
{
if (oShape.MsoDrawingType == Aspose.Cells.Drawing.MsoDrawingType.TextBox)
{
Aspose.Cells.Drawing.TextBox txtBox = (Aspose.Cells.Drawing.TextBox)oShape;
if (txtBox.Name == “txtTestControl”)
{
txtBox.Text = “DummyData”;
}
}
}
}
Thanks in Advance …