Import from excel

Problems ? Get help here!
snewland
Posts: 1
Joined: Sun Apr 15, 2012 6:38 am
Dive Computer: NA

Import from excel

Post by snewland »

Can I import dives from a excel spreadsheet I have been keepiNg my dive log information in? I looked a round in the FAQ and did see anything.
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Import from excel

Post by nick »

Unfortunately no, sorry. It would be impossible to read everyones custom excel format accurately - the best option is to export your data to a format that MacDive will read. Depending on what data you track, an Oceanlog CSV file will work, or perhaps a UDCF file.
User avatar
Jurgenfd
Posts: 7
Joined: Tue May 20, 2014 7:05 pm
Dive Computer: Suunto

Re: Import from excel

Post by Jurgenfd »

nick wrote:Depending on what data you track, an Oceanlog CSV file will work, or perhaps a UDCF file.
I have the same support request. How would I reformat my 94 dives in Excel as attached? I only track the below 13 columns per dive. Is there a Oceanlog CSV example file that would work? I have already made my file MacDive friendly in that I’ve removed unusual characters and given names like MacDive (English) uses.

Cheers,
Jurgen

The 13 data items per dive:
Date
Country
Location
Site
Name
Max Depth
Bottom Time
Buddy 1
Buddy 2
Notes (free text)
Night dive (boolean)
Current
Warm water
Attachments
Logboek for MacDive.xls.zip
(10.07 KiB) Downloaded 424 times
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Import from excel

Post by nick »

I can email you an Oceanic CSV file as an example, but you have to be very careful with it. It's a very specific format and MacDive expects certain things to exist. It also doesn't contain most of the data you list (eg country, location). So probably it would be pointless.

Your best bet would be a UDDF file, there are plenty of docs and examples of that available online.

Edit: Actually, your best bet would be a MacDive XML file, since everything maps 1:1. I can send you an example if you would like.
User avatar
Jurgenfd
Posts: 7
Joined: Tue May 20, 2014 7:05 pm
Dive Computer: Suunto

Re: Import from excel

Post by Jurgenfd »

nick wrote:Edit: Actually, your best bet would be a MacDive XML file, since everything maps 1:1. I can send you an example if you would like.
Hi Nick,

I took your advice and wrote a little conversion program that takes my Excel file (saved as CSV file) and rewrites it to the MacDive xml format. Working well for my case now. I attach the files.

Cheers,
Jurgen
Attachments
myDives.zip
(23.59 KiB) Downloaded 500 times
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Import from excel

Post by nick »

Hah! That's awesome :)
DiveGeek
Posts: 12
Joined: Fri Jun 06, 2014 9:56 am
Dive Computer: Cobalt 2

Re: Import from excel

Post by DiveGeek »

Came here for the same reasons as the above users...

Would you mind pointing us (me) to the Mac-Dive XML format specs? Or, better yet, post them in the wiki for us? :D

I going to create yet another conversion program (this one in Ruby) since I can't seem to find any that suit my needs.

The program and code will be open-sourced for anyone else that may want it. :geek:

Thanks!
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Import from excel

Post by nick »

Do you have any dives logged? Just export one as XML, it's pretty straightforward from there, just copy the layout.

If you don't yet have any dives logged, email me and I will send you an example file.

But, yeah I can probably put one up on the wiki to serve as an example at some point.
DiveGeek
Posts: 12
Joined: Fri Jun 06, 2014 9:56 am
Dive Computer: Cobalt 2

Re: Import from excel

Post by DiveGeek »

nick wrote:Do you have any dives logged? Just export one as XML, it's pretty straightforward from there, just copy the layout.
Well, sure, but since the dives I have entered have been done manually, I wasn't sure if all the possible elements would show up in the export file (or only the ones I happened to fill-in). If I'm going to build a conversion app, I would want to support all possible fields. Make sense?
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: Import from excel

Post by nick »

Most of the fields will show up. The only thing ones that won't are things like buddies, tags and gear. If you have none, you will just get an empty buddies tag with no child elements for example. Like I said, if you want an example, email me.

Cheers
Post Reply