Text Search in Excel PDF Export... - Page 1
Forum section: electronics / general

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 02, 2018, 11:49:16 pm
content: So I just noticed this little perversion.I'm looking at a PDF, which is an exported version of a spreadsheet. It's some boring requirements thing, lots of text, no actual formulas. So it doesn't matter that I'm reading it on PDF form, right?I search for a multi-word term. Nothing. What? No, that must be used in here, a dozen times.I search for one word, and find an occurrence. Yeah, no shit, it's there. Okay, select and copy the text, and search on that. Finds all of them.WTF?!Start poking at the search string. The letters are normal letters. The spaces are... breaking it?! What?In fact, Excel, in its infinite wisdom, has chosen to use non breaking spaces, " ", \u00a0, in the export. Making text search nearly useless.Thanks Microsoft.And no, it's not in the source document, those are normal spaces (\u0020).Just FYI, in case you encounter this, and in case you needed another occasion to vent about M$...So on a related note, I wonder if there is a way to add a plug-in to Windows itself, to add more functionality to OS widgets. Namely, for the present case -- more features for text inputs and edit boxes, like viewing and editing direct Unicode code points, and rich-text formatting elements. Maybe this already exists? Maybe as an Office or $PDF-viewer plugin rather than the OS? That'd be a bit less useful, but might help illuminate cases like the present one.Tim

author: iainwhite
author_rank: Unknown
timestamp: July 03, 2018, 12:17:08 am
content: Only way I can think is to post-process your pdf with a search/replace of \u00a0 to \u0020I think MS has used this so that table cells don't ever get broken up with a newline dividing the two halves of your cell data.Shame you can't turn off this feature in the pdf export options in excel.

author: tpowell1830
author_rank: Frequent Contributor
timestamp: July 03, 2018, 12:36:55 am
content: Hmmm, I wonder if the same thing would happen of you printed to PDF using some of the PDF document apps, such as PDFCreator or such.EDIT: I know you can search the text with the resulting PDFs.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: July 03, 2018, 12:44:38 am
content: I set up a simple sheet in Excel 365 with each of the following words in adjacent cells: the quick brown fox (i.e., 4 cells) and I put the same words as a string in one cell.I tried Excel's share as PDF/XPS document and also via Microsoft Print to PDF. I opened both in SumatraPDF and searched for "quick brown". It found both (i.e., in two adjacent cells and in a string). So everything behaves as it should.What version of Excel? How are you creating the PDF from Excel? How are you viewing the PDF?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 03, 2018, 12:51:53 am
content: I don't know how it was generated, probably Export PDF. We have Office 365 here, yes.Reading in Foxit Reader.Looking at it in Chrome, the spaces seem to be normal.Maybe most readers automatically convert \u00a0, or read metadata telling them to do so, and this version doesn't?Tim

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: July 03, 2018, 12:58:42 am
content: I just tried Nuance Power PDF and Foxit Reader - both worked fine.