如何在Excel 2003上创建dropdownlist [英] How to create dropdownlist on Excel 2003
问题描述
我正在使用 AutomationFactory.CreateObject(Excel.Application)
创建Excel文件。
I'm creating Excel files using AutomationFactory.CreateObject("Excel.Application")
.
我'使用这些代码行创建一个下拉列表:
I'm using these lines of codes to create a dropdown list:
mySheet.Range("A1").Validation.Add(Type:=Interop.Excel.XlDVType.xlValidateList, _
AlertStyle:=Interop.Excel.XlDVAlertStyle.xlValidAlertStop, _
[Operator]:=Interop.Excel.XlFormatConditionOperator.xlBetween,
Formula1:="=List!$C$3:$C$903")
公式(Formula1: = List!$ C $ 3:$ C $ 903)返回900行
The formula (Formula1:="=List!$C$3:$C$903") returns 900 rows
在Excel 2010中,完美无缺,但是在Excel 2003中,无法在单元格上创建下拉列表
In Excel 2010 it works perfectly, however, in Excel 2003 no dropdownlist are created on the cell
任何其他方法?
推荐答案
为了创建一个下拉列表在Excel中从另一张表中列出,您必须创建一个命名范围,然后声明是验证公式中的命名范围。
In order to create a dropdown list from another sheet in Excel, you have to create a named range and then declare the named range in the Validation formula.
请参阅本教程如何从头开始。
这篇关于如何在Excel 2003上创建dropdownlist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!