We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Compile Time Error while using FileFormatType.Excel2007Xlsx

Upgraded Aspose version from V 8.0 to V20.8.0

  1. FileFormatType.Excel2007Xlsx was not supported, is there any alternative method to use FileFormatType.Excel2007Xlsx?

Please find the sample code

public static bool IsAllowedFormat(Workbook wb)
{
var validFileFormats = new[]
{
FileFormatType.CSV,
FileFormatType.Excel2003XML,
FileFormatType.Excel2007Xlsx,
FileFormatType.Excel97To2003,
FileFormatType.Xlsx,
};
return validFileFormats.Contains(wb.FileFormat);
}

@sindhu0234,

Please see the FileFormatType enumeration API Reference document for your reference:

In short, you may use FileFormatType.Xlsx enum member in newer versions. By the way, for saving files, you may browse SaveFormat enumeration document for your reference and try it. Also, see the different examples and sample code in the document on saving to different file formats for your reference.