Message: 2 Date: Sun, 16 Oct 2016 21:59:58 +0200 From: "Michael Stockhausen" <michael.sto...@web.de> Subject: Re: [Gramps-users] csv import To: <gramps...@lists.sourceforge.net> Message-ID: <0483B03B477A4EB5BC7F6E76748CF2D3@MichaelPC> Content-Type: text/plain; charset="utf-8" Thanks everybody, the csv place import is now working. Just in case anyone is interested, here is what I did (using Excel on Windows10). There may be better/easier ways to do this, but at least it worked for me. 1) I have updated the code, as suggested by Paul, in my <importcsv.py> file on C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\plugins\importer with this code: https://raw.githubusercontent.com/gramps-project/gramps/master/gramps/plugins/importer/importcsv.py 2) I have capitalized the column headers to Place, Name, Type, etc. (I am not sure if this is necessary, though. It also worked with ?place?) 3) Attention: the IDs used in my Excel file were not adopted. Gramps creates new IDs in the order of the rows. So if you create a country e.g. in one row and a state in one of the next, you cannot use the ID in your Excel file for the ?enclosed_by? field. Either you count the rows and try to figure out the ID that Gramps will define, or you create the various levels one by one, entering the IDs of the higher level, that are already in Gramps, manually in ?Enclosed_by?. 4) In Excel Save under..., choose ?Unicode-Text (*.txt)? 5) Open file in Editor Copy the tab (the empty space) between two words Edit, search/replace in the search field: paste the tab that was copied above in the replace field enter a comma (?,?) Save; Set ?Encoding? from ?Unicode? to ?UTF-8? 6) In the Windows Explorer: change the ?.txt? to ?.csv? 7) Import in Gramps
Monet ovat kamppailleet sen kanssa, miten Grampsiin voisi tuoda Excelistä csc-muotoista dataan. Alla on erään käyttäjän antamat ohjeet. Kokeilkaa. Pekka
Message: 2 Date: Sun, 16 Oct 2016 21:59:58 +0200 From: "Michael Stockhausen" <michael.sto...@web.de
> Subject: Re: [Gramps-users] csv import To: <gramps-users@lists.sourceforge.net> Message-ID: <0483B03B477A4EB5BC7F6E76748CF2D3@MichaelPC> Content-Type: text/plain; charset="utf-8" Thanks everybody, the csv place import is now working. Just in case anyone is interested, here is what I did (using Excel on Windows10). There may be better/easier ways to do this, but at least it worked for me. 1) I have updated the code, as suggested by Paul, in my <importcsv.py> file on C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\plugins\importer with this code:
Place | Title | Name | Type | Latitude | Longitude | Code | Enclosed_by | Date |
[P0002] | USA | Valtio tai Liittovaltio | 38° 53′ 0″ N | 77° 1′ 0″ W | ||||
[P0099] | Meksikko | Valtio tai Liittovaltio | 19° 26′ 0″ N | 99° 8′ 0″ W | ||||
[P0134] | Kanta-Häme | Maakunta | N 60° 59.755' | E 24° 27.867' | ||||
[P0139] | Etelä-Karjala | Maakunta | 61° 4′ 0″ N | 28° 11′ 0″ E | ||||
[P0145] | Kymenlaakso | Maakunta | N 60° 52.572' | E 26° 41.417' | ||||
[P0146] | Lappi | Maakunta | N 66° 29.948' | E 25° 41.892' | ||||
[P0147] | Päijät-Häme | Maakunta | 60° 59.795'N | 25° 37.282'E | ||||
[P0149] | Pohjanmaa | Maakunta | 63° 5.545' N | 21° 36.954' E | ||||
[P0150] | Pohjois-Karjala | Maakunta | 62° 35.543'N | 29° 43.111'E | ||||
[P0151] | Pohjois-Pohjanmaa | Maakunta | 65° 0.749'N | 25° 28.092'E | ||||
[P0152] | Pohjois-Savo | Maakunta | 62° 53.569'N | 27° 41.339'E | ||||
[P0153] | Satakunta | Maakunta | 61° 28.942'N | 21° 49.307'E | ||||
[P0154] | Uusimaa | Maakunta | 60° 9.943'N | 24° 59.344'E | ||||
[P0156] | Michigan | Lääni tai Osavaltio | 43.8028144836 | -84.90234375 | ||||
[P0157] | Dickinson | Maakunta | 46° 0′ 0″N | 87° 52′ 12″W | [P0156] | |||
[P0158] | California | Lääni tai Osavaltio | 38° 33′ 20″ N | 121° 28′ 8″ W | [P0002] |
Outoa. Kuvittelisin, että kuviesi osoittama päällekirjoitus on seurausta vain, jos toit päivitysaineistosi paikat siten, että paikoissa oli ID:t hakasuluissa. Silloin Gramps olettaa, että viittaat kannassa jo olevaan paikkaan ja päivität sitä. Uudet paikat paikat tuodaan aina ilman hakasulkuja. Miltä näyttää päivittävä csv-tiedostosi?
On Monday, October 17, 2016 at 12:09:16 AM UTC+3, Pekka Valta wrote:
Monet ovat kamppailleet sen kanssa, miten Grampsiin voisi tuoda Excelistä csc-muotoista dataan. Alla on erään käyttäjän antamat ohjeet. Kokeilkaa. Pekka
Message: 2 Date: Sun, 16 Oct 2016 21:59:58 +0200 From: "Michael Stockhausen" <michael.sto...@web.de
> Subject: Re: [Gramps-users] csv import To: <gramps...@lists.sourceforge.net> Message-ID: <0483B03B477A4EB5BC7F6E76748CF2D3@MichaelPC> Content-Type: text/plain; charset="utf-8" Thanks everybody, the csv place import is now working. Just in case anyone is interested, here is what I did (using Excel on Windows10). There may be better/easier ways to do this, but at least it worked for me. 1) I have updated the code, as suggested by Paul, in my <importcsv.py> file on C:\Program Files\GrampsAIO64-4.2.4\lib\python3.5\site-packages\gramps\plugins\importer with this code: