cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jiwhite
Advocate I
Advocate I

Recognize Text into one cell in Excel

I use Recognize text in an image or a PDF document to extract text and save it to Excel. If I save each Text of the lines to a separate row in a Table in an Excel file, I can iterate through the rows, combine the text, and search it with Office Scripts. If I append each Text to a string variable, then put the resulting string into one cell in Excel, even though looking at the spreadsheet all of the text from the file is visible in the cell, Office Scripts only recognizes the first line of Text as the cell value.  The cell does not look like it's missing any information from the document and it does not look like it has carriage returns embedded.

 

This is not working properly.

not working.JPG

 

This works because each row is one line of Text.

working.JPG

 

Why is this happening? Can I strip a special character from the string variable in Power Automate before putting it into the cell to be able to recognize all of the text?  

1 REPLY 1
Yutao
Microsoft
Microsoft

Hello @jiwhite , would you mind sharing your script snippet? Are you using the range.find() method? Also is it possible to share a screenshot (or content) of the cell containing the text that cannot be found? For troubleshooting on your end, you can probably try console.log() the text content read out from that particular cell and see if there is anything suspicious there. You can also try checking things like theCellTextContent.includes(theStringToSearch) (which should return true if the cell content contains the search string) in your script to probe the behavior.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,120)