I am trying to loop through the workbook and have written the following code below where I pass a book and sheetname into a method and then for each sheet within the book I check to see if the name exists. The error I am getting is under the foreach loop
Error 2872 foreach statement cannot operate on variables of type 'Aspose.Cells.Workbook' because 'Aspose.Cells.Workbook' does not contain a public definition for 'GetEnumerator'
I am using vs 2005 and coding in C# using 220.127.116.11 aspose.cells.dll version. thanks.
private static bool WorksheetExistsByName(Workbook book, String sheetName)
foreach(Worksheet sheet in book)
if (sheet.Name.Equals(sheetName, StringComparison.InvariantCultureIgnoreCase))