I needed to create in-cell dropdownlist in excel using VB.NET,

So i used the code,

With xlWorksheet.Range("H2", "H101").Validation
.Add(Type:=Microsoft.Office.Interop.Excel.XlDVType.xlValidateList, AlertStyle:=Microsoft.Office.Interop.Excel.XlDVAlertStyle.xlValidAlertStop, Operator:=Microsoft.Office.Interop.Excel.XlFormatConditionOperator.xlBetween, Formula1:="Maintenance Planning")
End With

It works fine with Excel 2003, but it does not works on Excel 2007.
It shows below message,

Excel was able to open the file by repairing or removing the unreadable content.
Removed Feature: Data validation from /xl/worksheets/sheet1.xml part

Its the log file listing repairs,

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<summary>Errors were detected in file 'C:\Documents and Settings\kothainayaki\Desktop\sk.xls'</summary>
- <removedFeatures summary="Following is a list of removed features:">
<removedFeature>Removed Feature: Data validation from /xl/worksheets/sheet1.xml part</removedFeature>

Can anyone help for the above....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.