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

Free Support Forum - aspose.com

Autodetect file type

We want to extract text from different file types like a word doc, pdf, spreadsheets, images, etc.


Is there a way to autodetect the file type and use the appropriate parser to extract the documents like the Tika AutoDetectParser?

Hi Shwetal,

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.

Best Regards,