I am trying to import an excel file (xlsx) but it throws the following question :
Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73' or one of its dependencies. The system cannot find the file specified.
But it works perfectly fine for xls with the same code.
using (FileStream file = new FileStream(filename, FileMode.Open,
FileAccess.Read))
{
FileExtension = Path.GetExtension(filename);
if
(FileExtension.ToLower().Equals(StringConstants.FILE_EXTENSION_XLS))
{
HSSFWorkBook = new HSSFWorkbook(file);
intCountSheets = HSSFWorkBook.NumberOfSheets;
EaRepos = DiagFunAnaClass.EaRepos;
objPackage = DiagFunAnaClass.objPackage;
plantCode = DiagFunAnaClass.plantCode;
buttonValidate.Enabled = true;
}
else if
(FileExtension.ToLower().Equals(StringConstants.FILE_EXTENSION_XLSX))
{
XSSFWorkBook = new XSSFWorkbook(file);
The error comes in the last line of the above code.