photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: DigPeter on July 25, 2014, 01:40:45 PM

Title: Adding entries to Thesaurus from an excel file
Post by: DigPeter on July 25, 2014, 01:40:45 PM
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.
Title: Re: Adding entries to Thesaurus from an excel file
Post by: P.Jones on July 25, 2014, 02:13:28 PM
Would this be of any use

http://www.convertcsv.com/csv-to-csv.htm


Title: Re: Adding entries to Thesaurus from an excel file
Post by: 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.
Title: Re: Adding entries to Thesaurus from an excel file
Post by: DigPeter on July 25, 2014, 02:59:18 PM
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 ';'
Title: Re: Adding entries to Thesaurus from an excel file
Post by: DigPeter on July 25, 2014, 03:03:38 PM
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.
Title: Re: Adding entries to Thesaurus from an excel file
Post by: Ferdinand on July 25, 2014, 03:07:06 PM
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.
Title: Re: Adding entries to Thesaurus from an excel file
Post by: Mario on July 25, 2014, 03:27:28 PM
If all else fails, open the file in a text editor like Notepad++ and replace ; with tab.
Title: Re: Adding entries to Thesaurus from an excel file
Post by: 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
Title: Re: Adding entries to Thesaurus from an excel file
Post by: DigPeter on July 25, 2014, 04:52:46 PM
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?
Title: Re: Adding entries to Thesaurus from an excel file
Post by: Mario on July 25, 2014, 06:28:36 PM
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.