How to add data validation Using javascript ActivexObject

Discussion in 'Javascript' started by hukoh, Jun 15, 2012.

  1. hukoh

    hukoh

    Joined:
    Jun 15, 2012
    Messages:
    1
    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.";
    }
     
    hukoh, Jun 15, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oren

    ActiveXObject

    Oren, Nov 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    992
    Chris Jackson
    Nov 24, 2003
  2. =?Utf-8?B?T3Jlbg==?=

    ListBox, ActiveXObject

    =?Utf-8?B?T3Jlbg==?=, Apr 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    563
    Viktor Jevdokimov
    Apr 8, 2004
  3. Nomad
    Replies:
    1
    Views:
    723
    Dominic Myers
    Sep 10, 2004
  4. =?Utf-8?B?RXVnZW5l?=

    javascript, new ActiveXObject() and events

    =?Utf-8?B?RXVnZW5l?=, Aug 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    13,418
    =?Utf-8?B?RXVnZW5l?=
    Aug 15, 2007
  5. forum7

    JavaScript ActiveXObject error

    forum7, Oct 26, 2004, in forum: Javascript
    Replies:
    5
    Views:
    696
    Michael Harris \(MVP\)
    Oct 29, 2004
Loading...

Share This Page