Using textboxes in excel


Hi need help here ..

I have an excel template and have written code to insert values into it. I have an image on a cell and a textbox over it.
Is there any way to insert text into the textbox?


You cannot insert text into a textbox which is already in a template file. You can only create a textbox at run time with your expected text.

index = worksheet.TextBoxes.Add(5, 5, 160, 160);
TextBox textBox = worksheet.TextBoxes[index];
textBox.Text = "hello";


Thanks Laurence!


Sorry, got another question.

Aren't we able to change the Fill colour and line colour of the textbox at all? i would like to set it to no fill and no line..
and also text alignment?



No. These features are not supported yet. I will check and add them in the future releases.