[recoll-user] Re: Extracting numeric values from Excel files

  • From: Kyle Furge <kfurge@xxxxxxxxxxxx>
  • To: recoll-user@xxxxxxxxxxxxx
  • Date: Wed, 14 Oct 2020 17:33:46 -0400

Thanks for quick response and advice.  We will work harder to see how we
can coerce them into strings.

Thanks again,
-kyle


On Wed, Oct 14, 2020 at 5:07 PM Jean-Francois Dockes <jfd@xxxxxxxxxx> wrote:

Kyle Furge writes:
 > We have been using 'recoll -t' from the command line to search .xlsx
and .xlsm
 > file for specific barcodes, it has been working great.
 > .
 > Before all our barcodes had the form "V197767". However, now some
barcodes are
 > "2088023412".
 >
 > recoll -c /srv/local/recoll/ -t -o -d "V197767", shows alpha+numeric
barcodes,
 > but not numeric only barcodes.

Do you enter the numeric barcodes as strings or as numbers ?

I think that the xlsx handler only processes the strings (which are stored
in xl/sharedStrings.xml in the zip), and does not process numbers at all
(stored in xsl/worksheets/sheetX.xml)


 > It there a good place to start to see if we can modify this behavior?

You'd have to modify the handler to process the sheetX.xml files, and
extract numbers. This may not be very wise though, depending on the amount
of numeric data which you have.

Another approach would be to make sure that the barcodes are stored as
strings by quoting them or whatever is appropriate in Excel (in
libreoffice, you'd enter them as '2088023412).


 > We are using Recoll 1.23.7 + Xapian 1.4.5 on Ubuntu 18.04.1
 > (python-libxslt and python-libxml2)
 >
 > We have also have a local mimemap
 > .xlsm =
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Yep, no problem with this, I'll add it to the standard file

Any advice is appreciated

Nothing more for now :)

Cheers,

jf


Other related posts: