Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 16, 2022 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/fc8295feb215ab47140d2b068e6f6bbc to your computer and use it in GitHub Desktop.
Save aspose-com-gists/fc8295feb215ab47140d2b068e6f6bbc to your computer and use it in GitHub Desktop.
Convert Image to Excel with OCR in C# .NET
// Initialize an instance of AsposeOcr
AsposeOcr api = new AsposeOcr();
// Recognize image
RecognitionResult result = api.RecognizeImage("OCR.png", new RecognitionSettings
{
});
// Save the result as XLSX file
result.Save("test.xlsx", SaveFormat.Xlsx);
// Get image for recognize
string uri = "https://qph.fs.quoracdn.net/main-qimg-0ff82d0dc3543dcd3b06028f5476c2e4";
// Initialize an instance of AsposeOcr
AsposeOcr api = new AsposeOcr();
// Recognize image
RecognitionResult result = api.RecognizeImageFromUri(uri, new RecognitionSettings
{
});
// Save the result in XLSX format
result.Save("test.xlsx", SaveFormat.Xlsx);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment