Bug 143168 - Cannot read in excel spreadsheet to libreoffice base database
Summary: Cannot read in excel spreadsheet to libreoffice base database
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-03 00:38 UTC by hcantrell1
Modified: 2021-07-05 18:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Error Message (29.41 KB, image/jpeg)
2021-07-03 23:44 UTC, hcantrell1
Details
Create "Read Only" Version (161.62 KB, image/png)
2021-07-03 23:49 UTC, hcantrell1
Details
Copying "Read Only" Version into Base (204.92 KB, image/png)
2021-07-03 23:50 UTC, hcantrell1
Details
Field Types (47.05 KB, image/png)
2021-07-03 23:55 UTC, hcantrell1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hcantrell1 2021-07-03 00:38:34 UTC
Description:
I am trying to "read in" an excel spreadsheet to libreoffice database. It was easier for me to make the spreadsheet in excel, but I wish to enter my data and store my data using base. However, I cannot load the spreadsheet into the database and am getting errors when it tries to copy my data. The errors consist of "character F" or "character M" problems and I am unsure what those mean. I am using: https://dominoc925.blogspot.com/2013/05/import-csv-file-into-libreoffice-base.html website's instructions to attempt to load it in. I am able to create a "read only" version of the spreadsheet in another window of the database, but when I go to copy it into my database in order to get an edit version, that is when it is giving me the errors. It seems to be only affecting some of the fields from my spreadsheet as I have tried entering them one at a time. Most of them can load, but there are at least 3 of my fields that result in an error. 

Steps to Reproduce:
1. I converted my excel spreadsheet into a csv and then loaded that into a blank database which creates a "read only" copy. End goal is to "read in" my excel spreadsheet to base as a format for the database I want to use in base. 
2. I open the database in which I want the table to have an "edit" version in. 
3. Drag the "read only" table into the table section of the desired database. 
4. Then it will ask me what I want to copy in and I choose "definition and data"
5. Hit next and move all columns listed on the left over to the right box 
6. Hit next and go on to edit column information. I list every one of these as "TEXT (VARCHAR)" just to be safe. There are only numbers (without decimals and negatives) and letters that I will be entering. 
7. Click create when done editing the columns 
8. This is when it asks me if I want to "create a primary key" and I click yes. 
9. It gives me an error. 

Actual Results:
Errors. Cannot copy in my excel spreadsheet and end up with an editable version in base. 

Expected Results:
Loaded my excel spreadsheet (which is in csv format) into the base so I can start entering in my data. 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Not sure what information from "Help - About LibreOffice" you were asking me to put here?
Comment 1 Robert Großkopf 2021-07-03 07:35:58 UTC
What is the content of the errormessages?

Could you add such a csv-file here? 

In a database the content of a field is described very strict. If the content is longer than the field is described it will fail to import. If there is a character in a column, which should contain numbers it also will fail …
Comment 2 hcantrell1 2021-07-03 23:44:40 UTC
Created attachment 173330 [details]
Error Message

This is the error message I receive when trying to copy my spreadsheet into base.
Comment 3 hcantrell1 2021-07-03 23:49:38 UTC
Created attachment 173331 [details]
Create "Read Only" Version

This is how I create the "read only" version of the spreadsheet. This is what won't copy into base when I attempt it and what gives me errors.
Comment 4 hcantrell1 2021-07-03 23:50:26 UTC
Created attachment 173332 [details]
Copying "Read Only" Version into Base
Comment 5 hcantrell1 2021-07-03 23:55:29 UTC
Created attachment 173333 [details]
Field Types

I am only going to be entering numbers (1-5 digits in length with no decimals or negatives) and phrases like "yes" or "no", as well as tribal affiliations, ethnicities, race, etc. So I am describing entries with letters as TEXT(VARCHAR) and entries that are numbers as either "NUMERIC" or "DECIMAL". Should I do numeric or decimal? And should I be coding all of these as something else?
Comment 6 hcantrell1 2021-07-03 23:57:51 UTC
I can email you the csv file, Robert? Let me know if you're okay with that.
Comment 7 Robert Großkopf 2021-07-04 06:00:00 UTC
(In reply to hcantrell1 from comment #6)
> I can email you the csv file, Robert? Let me know if you're okay with that.

Mail the file to me. Seems there is a character "M" in a column, which is defined as a numeric column.
Comment 8 Robert Großkopf 2021-07-05 18:47:20 UTC
We have solved this problem per private mail. Seems it is working now.

So I set this bug to WORKSFORME.