Farpoint.Web.Spread.ComboBoxCellType data limitation

Posted by: dubey_ank88 on 29 May 2018, 3:39 am EST

  • Posted 29 May 2018, 3:39 am EST

    Preparing the excel sheet data from c# code and saving it does not populate all the data.
     I m using Farpoint.Web.Spread.ComboBoxCellType columns for dropdown list, the character length is limited to less than 255 characters.
     


    Usin the below code block :
     
    FarPoint.Web.Spread.ComboBoxCellType cb = new FarPoint.Web.Spread.ComboBoxCellType();

    string[] arr = new string[50];
    for (int r = 0; r < 50; r++)
    {
          arr[r] = "ItemItemItemIten_ienenehn" + r;

    cb.Items = arr;
     
    svFields.Columns[1].CellType = cb; 

    Please help!
     
  • Replied 30 May 2018, 8:42 am EST

    Hello,

    This looks like the design behavior, When we export ComboBoxCellType to excel, Spread will export to DataValidation list with source is string which is separated by "," character. The maximum length of list is 255 so other text at the end of string will be truncated after export i.e. Spread don't export combo box that have total item length larger than 255.

    Thanks,
    Deepak Sharma
  • Replied 30 May 2018, 9:35 am EST

    Is there any other way to achieve this?
  • Replied 31 May 2018, 12:41 am EST

    Hi Ankit,

    The combobox Spread is exported as Validation list and the validation list in Excel has a limit of 256 characters. So Spread has no control over it.

    You can add a column to Spread and put the combobox values in it. After exporting the Excel file you would need to manually set Data Validation list to the items in the column. Since the data validation list can show up to show 32,767 items from a list on the worksheet.

    Thanks,
    Deepak Sharma

  • Replied 31 May 2018, 2:55 am EST

    Let me share a scenario and you can guide me in the right direction. We are providing a bulk import functionality to our users where they download the template in form of excel file. This excel file will contain columns where the user can fill values, some of the columns in excel will contain a predefined list of items, out of these items the user will select the option listed in the list. In a nutshell, I have to provide a dropdown list in the excel which will contain hundreds of item. Please suggest how I can achieve this using Farpoint web dll version 8 (FarPoint.Web.Spread - 8.40.20143.0).
  • Replied 1 June 2018, 5:45 am EST

    Hi Ankit,

    I currently find no way to achieve this, however I will further discuss it with the development team and let you know. The tracking id for this issue is 259054.


    Thanks,
    Deepak Sharma
  • Replied 1 June 2018, 6:02 am EST

    Thanks for sharing the details.

    I am sharing the same solution for the reference, what we are trying to achieve.
    I found the solution in below link, but it was not the Farpoint.

    https://www.codeproject.com/Articles/1193482/Creating-ExcelSheet-with-pre-populated-dropdown-li?msg=5524870#xx5524870xx
  • Marked as Answer

    Replied 4 June 2018, 12:57 am EST

    Hello,

    Our developers have confirmed that it's not supported of ComboBox export and we also have no way to bypass this limitation from Spread ASP.NET.

    In V11, Spread.Win introduces DataValidation feature which allow user to use worksheet cell range as the data validation list.

    However, because Spread ASP.NET is in maintenance mode. Hence we are not putting forward any new feature for it too. In addition, adding Data Validation to Spread ASP.NET is nearly impossible because it requires new calculation engine to work.

    Hope it clarifies.

    Thanks,
    Reeva
  • Replied 4 June 2018, 2:35 am EST

    Thank you for the updates.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels