We want to extract text from different file types like a word doc, pdf, spreadsheets, images, etc.
You can use FileFormatUtil.DetectFileFormat method from Aspose.Word and Aspose.Cells etc. to detect file format. In fact Aspose.Cells method can detect more file formats as compared to Aspose.Words.
Unknown format will be returned if file is not recognized by any API.