Page 1 of 1

Import to gloss possible

Posted: 2011-09-05 12:54:36
by huangqi
I have about 1000 or so "glossary" entries (abbreviation + expansion) in an excel spreadsheet. I have struggled trying to figure out a way to import them into a new glossary file. Does anyone know a way to do this? Thanks...

Re: Import to gloss possible

Posted: 2011-09-06 12:41:43
by martin
NWP won't import Excel files, but you could export your spreadsheet from Excel as a CSV file, and then run a NWP macro to convert that into a glossary file. If you post a short snippet of the exported CSV/text file here, we would write that macro for you.

Re: Import to gloss possible

Posted: 2011-09-06 13:20:27
by huangqi
Thanks for the help... The only issue when saving an excel file to a CSV (at least on my system) is that it erases any formatting that I had on the data (such as italics etc). Is there any options that you know of that will preserve the formatting, this is essential to the gloss. Thanks,

Huangqi

Re: Import to gloss possible

Posted: 2011-09-06 14:10:36
by martin
Does your copy of Excel let you export as RTF? That would be the best. Otherwise, check if there are any other formatted text export options (eg: ".doc", DOCX, etc).

Re: Import to gloss possible

Posted: 2011-09-06 14:22:28
by huangqi
I have the latest Excel (2011 Mac). These are not options. Thanks though...

-Huangqi

Re: Import to gloss possible

Posted: 2011-09-06 15:38:11
by huangqi
Ok, I pasted the data from excel into Nisus and saved the file as RTF. Maybe you can use this for the macro. Please let me know if you need anything else.

Thanks,

Huangqi

Re: Import to gloss possible

Posted: 2011-09-06 16:04:37
by martin
Okay, great, I'm glad you could paste directly from Excel. So here's what to do:

1. Download the zip archive I'm attaching to this forum post.
2. In NWP, use the menu Macro > Show Macros Folder in Finder.
3. Extract the zip archive and move both extracted files to the Macros folder that was shown in step 2.
4. In NWP, open up your table from Excel (eg: make a new document and paste from Excel).
5. From the Macros menu, run the macro Convert Gossary Table.
6. That should result in a proper Nisus glossary file. Save that somewhere (be sure to choose the format "Nisus Writer Glossary" in the Save dialog).
7. Open your NWP prefs, switch to the QuickFix pane, click the "Import Glossary" button, and then choose the file you saved in step 6.

That should do it. Once you have the glossary imported you can delete the macro files and the glossary you saved in step 6.

Re: Import to gloss possible

Posted: 2011-09-08 12:53:48
by huangqi
This works great, much thanks!!! :)