We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

about xlValidate

Thread ID:

Created:

Updated:

Platform:

Replies:

124863 Jul 5,2016 05:50 AM Jul 8,2016 08:42 AM JavaScript 5
loading
Tags: ejSpreadSheet
xycool
Asked On July 5, 2016 05:50 AM

XLValidate.applyDVRules(range, values, type, required, showErrorAlert)

Please tell me how many validation conditionfor values
for example:"Greater","LessOrEqual","Between","list","GreaterOrEqual"
and more?or can i set to empty array.
Where can I find a note。

one more question,How to get to verify the results obtained after the user to edit cell,i want to get yes or no,and change the cell background color

Silambarasan I [Syncfusion]
Replied On July 6, 2016 07:49 AM

Hi Xycool, 
 
Thank you for using Syncfusion products. 
 
Query #1 “Please tell me how many validation condition for values for example: "Greater"…? or can i set to empty array.” 
 
Please refer the below table for available Data validation conditions based on data types in Spreadsheet. 
 
S.no 
Data Types 
Conditions 
1. 
Number 
“greater than” 
“greater or equal to” 
“less than” 
“less than or equal to” 
“equal to” 
“not equal to" 
“between” 
“not between” 
2. 
Decimal 
3. 
Date 
4. 
Time 
5. 
TextLength 
6. 
List 
-  
 
 
Note: values - field should be non-empty in XLValidate.applyDVRules(). You can also refer the Data Validation options which is placed under “DATA” tab.  
 
Query #2 “Where can I find a note?” 
 
Currently, we are working on help documentation for ejSpreadsheet and we will publish it in any of our upcoming Essential studio releases.  Meanwhile, please refer our online API document for ejSpreadsheet. 
 
 
Query #3 “How to get to verify the results obtained after the user to edit cell,i want to get yes or no,and change the cell background color” 
 
Before we start provide solution, we would like to know the following details, 
 
1. Using Data validation, we can highlight the validation failed (false) conditions values by using “Format Invalid Data” option under Data Validation in DATA tab or by using XLValidate.highlightInvalidData() method. Could you please conform whether your requirement about changing cell background color as it is same as in our highlight Invalid Data option?   
 
 
2. While save the edited cell, we can compare the previous cell value and modified cell value in ‘cellSave’ client-side event by using ‘pValue’ and ‘value’ property. Also, we have prepared a sample to demonstrate this in JS Playground. Could you please check the below sample and let us know whether using this event will fulfil your requirement? 
 
 
Could you please get back to us with the above information so that we can analyze based on that and provide you a better solution?  The information provided would be great help for us to proceed further.  
 
 
Regards, 
Silambarasan I 


xycool
Replied On July 6, 2016 10:00 PM

Thank you for your reply, I have solved my problem。

One more question,If i need to save the excel with asp.net MVC, i use 'excelUrl' and post to controller,

in controller,it's my code:

string sheetModel = Request.Params["sheetModel"], sheetData = Request.Params["sheetData"];
Stream getStream = Spreadsheet.Save(sheetModel, sheetData, ExportFormat.XLSX, ExcelVersion.Excel2013);
using (ExcelEngine excelEngine = new ExcelEngine())
{
    Syncfusion.XlsIO.IWorkbook workbook = excelEngine.Excel.Workbooks.Open(getStream );
}

But this throws an exception,how can i get IWorkbook frome ejSpreadsheet,I need to parse the validity of the user to edit data, thank you!

Silambarasan I [Syncfusion]
Replied On July 7, 2016 06:56 AM

Hi Xycool, 
 
Thanks for your update. 
 
We have checked the provided code snippets and we would like to suggest you to reset the stream position to zero, before passing it in Workbooks.Open() method to get the IWorkbook object.  Please refer the below modified code example. 
 
 
[AcceptVerbs(HttpVerbs.Post)] 
public void ExportToExcel() 
{ 
    string sheetModel = Request.Params["sheetModel"], sheetData = Request.Params["sheetData"]; 
    Stream getStream = Spreadsheet.Save(sheetModel, sheetData, ExportFormat.XLSX, ExcelVersion.Excel2013); 
 
    //Reset the stream position to zero. 
    getStream.Position = 0; 
 
    using (ExcelEngine excelEngine = new ExcelEngine()) 
    { 
        Syncfusion.XlsIO.IWorkbook workbook = excelEngine.Excel.Workbooks.Open(getStream); 
 
        //Your code here 
    } 
} 
 
 
 
For your convenience, we have prepared a sample to demonstrate this and the same can be downloaded from the below link, 
 
 
 
Regards, 
Silambarasan I 


xycool
Replied On July 7, 2016 10:56 PM

Thank you for your answer,if i editing online, then i export the  ejSpreadsheet to IWorkbook,it's no problem,but when i upload my excels,and then export the ejSpreadsheet it's throw System.ArgumentOutOfRangeException,i user sample project throw System.ArgumentOutOfRangeException too, what's problem?Is my excel complicated?

Attached is my project need to upload excel。

Attachment: testExcel_a892e60f.rar

Silambarasan I [Syncfusion]
Replied On July 8, 2016 08:42 AM

Hi Xycool, 
 
Thanks for your update. 
 
While exporting the attached excel file, we have faced an exception “System.FormatException: Input string was not in a correct format” but we are unable to reproduce the reported exception “System.ArgumentOutOfRangeException”.  However, we considered this as an issue and a support incident has been created under your account to track the status of this requirement.  Please log on to our support website to check for further updates. 
 
 
 
Regards, 
Silambarasan I 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;