How to add data validation Using javascript ActivexObject

Joined
Jun 15, 2012
Messages
1
Reaction score
0
I can't add data validation to excel using javascript
But i have Example C# code and library
Example Syntag

private void SetValidation()
{
Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
this.Controls.AddNamedRange(this.Range["A1", missing],
"namedRange1");

namedRange1.Validation.Add(
Excel.XlDVType.xlValidateTextLength,
Excel.XlDVAlertStyle.xlValidAlertStop,
Excel.XlFormatConditionOperator.xlGreater, 3, missing);

namedRange1.Validation.InputMessage = "Enter a name.";
namedRange1.Validation.ErrorMessage =
"Please enter a name with 3 or more characters.";
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top