使用 Validation 数据验证,下拉清单数据过多时不生效。

image.png (132.7 KB)

image.png (49.9 KB)

image.png (11.0 KB)
数据在20个以内才会生效

@feng.qun.zhu.avaryholding.com
和数据多少没有关系的,请提供下文件

2026-05-28 (1).zip (8.8 KB)

你好,文件如上,请帮看一下

@feng.qun.zhu.avaryholding.com
是哪个单元格,你上面图片里是q列么,我在excel里面也点不出来啊

// 7. 产品阶段列(索引16)- 按客户类型下拉选择
        int customerPhaseCol = 16;
        int customerTypeCol = 2;
        String customerType = cells.get(sampleStartRow, customerTypeCol).getStringValue();
        customerType = customerType == null ? "" : customerType.trim();
        String customerTypePhaseRange = customerTypePhaseRangeMap.get(customerType);
        boolean hasCustomerTypeConfig = customerTypePhaseRangeMap.containsKey(customerType);
        if (hasCustomerTypeConfig && StrUtil.isBlank(customerTypePhaseRange)) {
            // 已配置客户类型但阶段值尚未维护时,暂不设置该行产品阶段校验
            continue;
        }
        if (!hasCustomerTypeConfig) {
            // 未命中的客户类型走通用回退,避免出现完全无下拉
            customerTypePhaseRange = customerPhaseRange;
        }
        int customerPhaseValidationIndex = validations.add(CellArea.createCellArea(sampleStartRow, customerPhaseCol, sampleStartRow, customerPhaseCol));
        Validation customerPhaseValidation = validations.get(customerPhaseValidationIndex);
        customerPhaseValidation.setType(ValidationType.LIST);
        customerPhaseValidation.setFormula1(customerTypePhaseRange);
        customerPhaseValidation.setInCellDropDown(true); // showDropDown: true
        customerPhaseValidation.setIgnoreBlank(true); // allowBlank: true
        customerPhaseValidation.setInputMessage("请从下拉列表选择");
        customerPhaseValidation.setShowInput(true);
        customerPhaseValidation.setShowError(true);
        customerPhaseValidation.setAlertStyle(ValidationAlertType.STOP); // alertStyle: "stop"
        customerPhaseValidation.setErrorTitle("输入错误");
        customerPhaseValidation.setErrorMessage("请从下拉列表中选择产品阶段");

@feng.qun.zhu.avaryholding.com

感谢您提供相关的 Java 代码片段。

这些代码逻辑对于我们深入分析数据验证(Validation)在处理较多数据项时的表现非常有帮助。我们已经将这些代码逻辑同步给开发团队,以便更准确地模拟您的应用场景并定位下拉列表无法正常显示的原因。

目前该问题仍在持续调查中,一旦有任何进展或修复结果,我们会第一时间在此贴中通知您。感谢您的耐心配合。

这个是数据较少时,可以正常显示的文件。
f3c6e033-4cd3-4d13-94df-f2beea0072e3.zip (9.6 KB)

Sealed-Sample,Trial-Produce,Sample,SS2,SOP,RFQ,RD,Quote,HVT,Proto,PRQ,PREDP1,Lunchbox,EVT_X,EVX,FDP,DVT_X,DVT-X,EVTX,DP4,DP,DP1,DP2,DP3,DV,A,B,C,Carrier,EVT1.1,SV3-2,EVT,MP,SV1,SV2,SV3,EVB,SV1-1,SV1-2,SV2-1,SV2-2,SV3-1,P1.1,VN2,VN1,V4,V3,V2,V1,PVT,P1,P2,EVT+X,DVT,P0

@feng.qun.zhu.avaryholding.com

感谢您提供这一组具体的字符串值。

这些详细的数据项对于我们定位问题非常有帮助。我们已经观察到您列出的字符串列表,并将其补充到了当前的调查案例中。开发团队将针对这组特定的数据值进行深入分析,以确认在何种边界条件下会导致下拉菜单失效。

目前该问题仍在处理中,一旦有进一步的调查结果或修复进展,我们会立即在这里通知您。感谢您的持续配合与支持。

@feng.qun.zhu.avaryholding.com
您好,

感谢您提供相关的截图信息。

我们已经成功复现了您描述的问题。经过初步测试,我们确认当使用 Validation 设置数据验证时,如果下拉清单(Formula1)中的字符长度超过了 Excel 规范的限制,会导致下拉列表无法正常生效。

目前我们正在针对此限制进行内部评估和优化,以确保在大数据量的情况下也能正确处理。一旦有进一步的进展,我们会及时通知您。

我们已在内部问题跟踪系统中打开了以下新工单,并将根据 免费支持政策 中提到的条款提供修复程序。

问题 ID:CELLSGRIDJS-2508

如果您需要优先支持以及直接联系我们的付费支持管理团队,可以获取 付费支持服务