Adding entries to Thesaurus from an excel file

Started by DigPeter, July 25, 2014, 01:40:45 PM

Previous topic - Next topic

DigPeter

I have quite a large number of new entries that I want to merge with my existing thesaurus.   They are in excel format, an extract of which is below:

@Keywords            
   Taxa         
      Flowering plants      
         Aizoaceae   
            Orthopterum sp
         Alismataceae   
            Alisma plantago-aquatica
         Apiaceae   
            Astrantia maxima
            Chaerophyllum astrantiae
            Chamaesciadium acaule
            Pimpinella rhodantha

There is no provision for this in IM5.  Converting to a text format with each level indented by tab would be a long task.

Any suggestions please would be welcome.

P.Jones


Ferdinand

My copy of Excel can save-as-csv.  So does Libreoffice Calc.  I imagine that most programs would.  I'd just delete the first column with @keywords before you save-as.

DigPeter

Quote from: P.Jones on July 25, 2014, 02:13:28 PM
Would this be of any use

http://www.convertcsv.com/csv-to-csv.htm
Thank you.  I have just tried that idea, but it does not produce tabs, despite using that setting - just ';'

DigPeter

Quote from: Ferdinand on July 25, 2014, 02:52:04 PM
My copy of Excel can save-as-csv.  So does Libreoffice Calc.  I imagine that most programs would.  I'd just delete the first column with @keywords before you save-as.
Thank you Ferdinand.  I can save as csv in excel 2007, but not with tabs.   IM5 does not provide for importing with csv, unless I have missed something.  It would be much easier if there were an xls(x) solution.

Ferdinand

I just checked and what you actually want is save as "Text (tab delimited)"  This should work.  It should produce the same sort of text file that my 3.5->5 migration script does.

Mario

If all else fails, open the file in a text editor like Notepad++ and replace ; with tab.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

KimAbel

Hello DigPeter

I am also using Excel to manage my keywordlists with synonyms. I do all my organization in Excel and when this is done I am saving it as text and opens it in word. There I can use search and replace to make it fit into the format that IM5 accepts.
Kim

DigPeter

Quote from: KimAbel on July 25, 2014, 03:40:17 PM
Hello DigPeter

I am also using Excel to manage my keywordlists with synonyms. I do all my organization in Excel and when this is done I am saving it as text and opens it in word. There I can use search and replace to make it fit into the format that IM5 accepts.
Kim
Thank you.  I have muddled through successfully.  In notepad++ , I ended with a load of ^t instead of the usual tab, which then were transferred to the thesaurus.  I had exported the original thesaurus, so could correct this.  I found in excel "save as" a tab delimited txt option and this successfully merged with the existing thesaurus.

@Mario - would a feature request to merge/replace thesauri direct from an excel file be feasible?

Mario

The tab-delimited format works just fine and can be produced directly from Excel, OpenOffice Calc, LibreOffice Calc and all other programs which can export data in tab-delimited format.

Automating Excel to directly pull data from XLS or XLSX formats creates a version nightmare, because different automation interfaces for different Excel versions have to be used etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook