Using textboxes in excel


#1

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?


#2

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";


#3

Thanks Laurence!


#4

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?

thanks


#5

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