{"id":904,"date":"2021-08-26T13:36:24","date_gmt":"2021-08-26T13:36:24","guid":{"rendered":"https:\/\/99excel.com\/home\/?p=904"},"modified":"2022-02-07T15:07:47","modified_gmt":"2022-02-07T15:07:47","slug":"how-to-extract-text-from-images-using-excel-vba-with-tesseract-ocr","status":"publish","type":"post","link":"https:\/\/99excel.com\/home\/how-to-extract-text-from-images-using-excel-vba-with-tesseract-ocr\/","title":{"rendered":"how to extract text from images using excel vba with Tesseract OCR"},"content":{"rendered":"\n<p>In below video, I have explained and give you vba visual basic application code to convert all bulk images text into Excel sheet using google Tesseract OCR.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br>Please watch full video and understood all requirement and follow the steps. Contact me for any further support and projects: <a href=\"https:\/\/99excel.com\/contact-form.html\" data-type=\"URL\" data-id=\"https:\/\/99excel.com\/contact-form.html\" target=\"_blank\" rel=\"noreferrer noopener\">Click here to contact me<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"how to extract text from images using excel vba with Tesseract OCR - 99Excel.Com\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/4VP54f0xV-E?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Follow the following Steps.<\/p>\n\n\n\n<p>Step 1. Download Tesseract OCR (<a href=\"https:\/\/github.com\/tesseract-ocr\/tesseract\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/tesseract-ocr\/tesseract<\/a>)<\/p>\n\n\n\n<p>Step 2. Add Path in your PC: Type &#8220;Path in search tab in window&#8221;<\/p>\n\n\n\n<p>Step 3. VBA code: select Reference library as &#8220;Microsoft shell controls and automation&#8221;<\/p>\n\n\n\n<p>Step 4. Get and run below VBA code and enjoy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Sub Image_into_Excelby_Ajit_Yadav()\nOn Error Resume Next\nDim myshell As Shell32.Shell, ReadCommand, CaptchaCode, i\nSet myshell = New Shell32.Shell\nFor i = 1 To 5 ' Change it\nReadCommand = \"tesseract.exe \" &amp; \"'C:\\Users\\Kumar Ajit\\Downloads\\All Images\\Image \" &amp; i &amp; \".png'\" &amp; \" \" &amp; \"'C:\\Users\\Kumar Ajit\\Downloads\\All Images\\READ\\Image \" &amp; i &amp; \"'\" &amp; \" ' -l eng'\"\nmyshell.ShellExecute \"powershell\", vArgs:=ReadCommand, vShow:=0\nApplication.Wait (Now + TimeValue(\"00:00:05\"))\nOpen \"C:\\Users\\Kumar Ajit\\Downloads\\All Images\\READ\\Image \" &amp; i &amp; \".txt\" For Input As #1\nLine Input #1, CaptchaCode\nClose #1\nApplication.Wait (Now + TimeValue(\"00:00:02\"))\nMyCaptchaCode = Application.WorksheetFunction.Substitute(CaptchaCode, Chr(10), \"\")\nCells(i + 1, 2).Value = Trim(Application.WorksheetFunction.Clean(MyCaptchaCode))\nCells(i + 1, 1).Value = \"Sr. \" &amp; i\nNext i\nEnd Sub<\/code><\/pre>\n\n\n\n<p>Tage: how to extract text from image using excel vba<\/p>\n\n\n\n<p>Extract Text from a picture in excel<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In below video, I have explained and give you vba visual basic application code to convert all bulk images text into Excel sheet using google Tesseract OCR. Please watch full video and understood all requirement and follow the steps. Contact me for any further support and projects: Click here to contact me Follow the following &#8230; <a title=\"how to extract text from images using excel vba with Tesseract OCR\" class=\"read-more\" href=\"https:\/\/99excel.com\/home\/how-to-extract-text-from-images-using-excel-vba-with-tesseract-ocr\/\" aria-label=\"More on how to extract text from images using excel vba with Tesseract OCR\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-904","post","type-post","status-publish","format-standard","hentry","category-99excel-com"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/comments?post=904"}],"version-history":[{"count":2,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/904\/revisions"}],"predecessor-version":[{"id":906,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/posts\/904\/revisions\/906"}],"wp:attachment":[{"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/media?parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/categories?post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/99excel.com\/home\/wp-json\/wp\/v2\/tags?post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}