importing from a csv on mac not working.

Discuss HanDBase running on Mac OSX computers, as well as conduits.

importing from a csv on mac not working.

Postby VelvetLounger » Wed May 12, 2021 12:03 am

Ive been pulling my hair out on this for a while now. Trying to import a csv into an existing db.
1. I exported the existing db to a csv.
2. added data to the csv file
3. re-imported the csv.

This is where the problem is. The imported records do not reflect whats in the csv. I know the fields all line up because im using the exact csv file that was exported in the first place.

Anyone know what im doing wrong here? Right now im playing with test data to try and work this out before I try with my real data.

Thanks!
Using HanDBase since I had my Palm 3.
VelvetLounger
 
Posts: 109
Joined: Thu Dec 15, 2011 7:47 pm
Location: Chicago, IL

Re: importing from a csv on mac not working.

Postby glenwf » Wed May 12, 2021 10:11 am

Try importing the CSV to a NEW database with a different name than the original. Then check to see if all expected records are there. If not, then there might be a format problem.

What did you edit the CSV file with? Some "text editors" are not as clean as they claim to be. I've got around that on my mac by importing the CSV into a spreadsheet and editing the data there and exprorting to CSV file before I import back into my original HanDBase file. That seems to guarantee the CSV format remains true.
glenwf
 
Posts: 219
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: importing from a csv on mac not working.

Postby curtterp » Wed May 12, 2021 1:54 pm

VelvetLounger wrote:Ive been pulling my hair out on this for a while now. Trying to import a csv into an existing db.
1. I exported the existing db to a csv.
2. added data to the csv file
3. re-imported the csv.

This is where the problem is. The imported records do not reflect whats in the csv. I know the fields all line up because im using the exact csv file that was exported in the first place.

Anyone know what im doing wrong here? Right now im playing with test data to try and work this out before I try with my real data.

Thanks!


When you say that the imported records do not reflect what is the in csv file, what exactly are you seeing? Are any of the records that you added to the file importing, or are just some of the data in the records not importing. Are the imported records go to a certain point, then nothing after that point, or is it different records and different columns? What is the workflow? Are you exporting from an iPhone/Android device, or exporting from your Mac? Importing into Mac/iPhone/Android?

I know, lots of questions, but in order to try to help you further, I need to try to understand your workflow, devices, and what is not showing up from the imported file.

Glen has a couple of good points too. If your using a text editor instead of a spreadsheet program, its possible to miss/mess up the formatting.
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 801
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL

Re: importing from a csv on mac not working.

Postby VelvetLounger » Wed May 12, 2021 4:40 pm

glenwf wrote:Try importing the CSV to a NEW database with a different name than the original. Then check to see if all expected records are there. If not, then there might be a format problem.

What did you edit the CSV file with? Some "text editors" are not as clean as they claim to be. I've got around that on my mac by importing the CSV into a spreadsheet and editing the data there and exprorting to CSV file before I import back into my original HanDBase file. That seems to guarantee the CSV format remains true.


What im seeing is the Date field all show 1/1/2020. One of the fields is filling in correctly, the rest are all blank. It feels like a field order thing, but all the fields line up between the two.
Using HanDBase since I had my Palm 3.
VelvetLounger
 
Posts: 109
Joined: Thu Dec 15, 2011 7:47 pm
Location: Chicago, IL

Re: importing from a csv on mac not working.

Postby VelvetLounger » Wed May 12, 2021 5:12 pm

Ill explain the whole process im trying.

-I created a new DB on my ipad by using an existing one as a template.
-I enter three records with test data.
-Sync with my macbook pro using the desktop sync option in Handbase desktop 4. Devices > Sync/Configure ipad...
-The new DB shows up in the desktop app. I export the records into a CSV file on my desktop.
-Open the CSV file using OpenOffice Spreadsheet.
-Copy the existing 3 rows into the three rows directly under the first three.
-save the CSV file
-Using the Handbase desktop app I try file > import > into existing database > select CSV file > I select to append > first line has labels > and there are no quotation marks.
-I select the CSV file and it does the import.
-The Handbase app shows that there are now 9 records. The original three, and 6 more that were appended from the CSV file.
-The 6 appended records are junk. See my screen shot below.

When I import the spreadsheet into a new DB the 6 records are all present and look great, but this new DB doesn't have any of my other fields that get used in the background, like calculations, Location, etc...

I'm pretty sure this has to do with improperly aligning fields. do I have to include columns for every field in the DB including calculations, labels etc? I though I only have to make sure the fields that show up in an export need to be included upon importing.

Image

Thanks for the help with this!
Using HanDBase since I had my Palm 3.
VelvetLounger
 
Posts: 109
Joined: Thu Dec 15, 2011 7:47 pm
Location: Chicago, IL

Re: importing from a csv on mac not working.

Postby curtterp » Fri May 14, 2021 11:22 am

VelvetLounger wrote:Ill explain the whole process im trying.

-I created a new DB on my ipad by using an existing one as a template.
-I enter three records with test data.
-Sync with my macbook pro using the desktop sync option in Handbase desktop 4. Devices > Sync/Configure ipad...
-The new DB shows up in the desktop app. I export the records into a CSV file on my desktop.
-Open the CSV file using OpenOffice Spreadsheet.
-Copy the existing 3 rows into the three rows directly under the first three.
-save the CSV file
-Using the Handbase desktop app I try file > import > into existing database > select CSV file > I select to append > first line has labels > and there are no quotation marks.
-I select the CSV file and it does the import.
-The Handbase app shows that there are now 9 records. The original three, and 6 more that were appended from the CSV file.
-The 6 appended records are junk. See my screen shot below.


That is what I am seeing with import into current database too

VelvetLounger wrote:When I import the spreadsheet into a new DB the 6 records are all present and look great, but this new DB doesn't have any of my other fields that get used in the background, like calculations, Location, etc...

When I import into a new database, I get all the records, all the fields and data, but the calculated fields in the original database show up as just regular fields in the new database. This is expected because the csv file only has the data, not the calculations when exporting.

VelvetLounger wrote:I'm pretty sure this has to do with improperly aligning fields. do I have to include columns for every field in the DB including calculations, labels etc? I though I only have to make sure the fields that show up in an export need to be included upon importing.

Image

Thanks for the help with this!


The only issue that I had during my testing with different spreadsheet programs was with Apple's Numbers, for some reason an import into a new database just did something weird (basically put all the data into one field), which could be something I did wrong because I don't use Numbers, I use Excel for my spreadsheets. I also tested with OpenOffice spreadsheet which had the same results as Excel.

One thing I want to verify with you, is that do you have the latest version of HanDBase for the Mac? Current version is Version 4.6.0.2. If you don't have the current version, go to HanDBase website and login with the credentials that you were emailed when you purchased the Desktop program.

Note: The version listed in the download section will show an earlier version number, just go ahead and download it anyways. The website lists the previous version, but the download has the latest version
Have a good day

Curt
I am not a DDHSoftware employee, just a long time HanDBase user.... from Palm to Windows Mobile to Android, to iOS. Thanks to DDH, the database files transferred to each platform without a problem.
curtterp
 
Posts: 801
Joined: Tue May 26, 2009 6:41 pm
Location: Northern IL


Return to HanDBase for Mac

Who is online

Users browsing this forum: No registered users and 1 guest