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. Image for the cookie policy date

how to create dropdown box(validation value range from another sheet)

hi, guys, I am using Syncfusion ExcelRW now. I try to create a dropdown list with certain values, those values are defined in cells in one column in another sheet, how can I do that? I know how to make a dropdown list with values from a string array in my program, but seems the same function didn''t allow me to put the cells'' position. Thanks a lot for your help.

3 Replies

RA Ramu Syncfusion Team January 23, 2006 03:02 PM UTC

Hi Michael, Here is the sample that adds value to the dropdown list from the worksheet. sample Thank you for your interest in Syncfusion products. Thanks, Ramu.


AD Administrator Syncfusion Team January 24, 2006 09:11 PM UTC

thanks, Ramu, it worked. Btw, do you know how to set the sheet''s "visibility" as "hide", so end user cannot see it, but my other sheets can pull the values from it. thanks again. Michael


RA Ramu Syncfusion Team January 25, 2006 06:13 AM UTC

Hi Michael, Here is the sample that hides the sheet in workbook and to retrieve data from hidden sheet. You could also unhide the hidden sheet in workbook. Sample code: //Hiding the first sheet in the workbook. sheet.Visibility =WorksheetVisibility.Hidden; //Data in hidden sheet. sheet.Range ["A1"].Text ="Hidden sheet"; for(int i=2;i<=10;i++) { sheet.Range [i,1].Text ="Value"+ (i-1).ToString (); } IRange rang=sheet.Range ["A1:A5"]; IRange rang1=sheet1.Range ["A2:A6"]; sheet1.Range["A1"].Text ="Value from hidden sheet"; //Reading value from Hidden Sheet. rang.CopyTo (rang1); Please let me know if you have any questions. Thanks, Ramu. HideSheetInWorkbook.zip

Loader.
Live Chat Icon For mobile
Up arrow icon