Unable to Insert in Base after importing

I have been researching this for days. None of the previously provided solutions work for me.

I import a Spreadsheet and in that process I am not given the option of picking a primary key. I also cannot find a place in the table edit to make one of the fields a primary key. One of the solutions I found said a primary key was needed to add rows. The table is created and I save it. I have tried not saving it too.

I want to insert additional rows to this table. I select insert and Records is grayed out. I go to the bottom of the table and try to add a row, that does not work either.

I tried creating a different table with the fields I need, and tried to paste in the rows from the spreadsheet. That locked up the program even though I waited 60 minutes.

I have right clicked on the table name and gone to Edit. I can’t change the properties. They are all greyed out.

I want to import spreadsheet data into a table and be able to use it like a table. Do I need to import differently? Is there a way to get these tables working so data can be inserted?

Hello,

It seems you have attached the spreadsheet to the Base file. This is done during Base creation by attaching to an existing database.

Yes, Primary Key is absolutely needed. But you must start with an actual database (spreadsheet attachment is not). This is done with creating a new Base file and selecting an actual database such as HSQLDB embedded.

Then you can import data into Base in different ways. For that see the Base documentation here → LibreOffice Base Guide. See Chapter 3 - Tables. There is a section Importing data from other sources which discusses importing data from a spreadsheet. Covers Primary key also.

I tried this and looked at the documentation. I have been waiting 30 minutes for the 900K rows to paste in. This is what I referenced before about waiting 60 minutes and it just locks up both Base and Calc. I can try importing after rebooting.

@FamilyFriendlyGaming,

900K rows is a critical piece of information missing from the question. Also missing is the database used. I would not use HSQLDB embedded for anything like that.

Depending upon the database used, you waiting period is not surprising. You should look at my answer in this post → How to properly import CSV data into a HSQLDB DB?, and then the link in that post leading to a more detailed look at timing and importing data. Yes it is .csv but it is relative.

You will see it depends upon the type data being input (copy/paste or .csv) AND the database used.

Edit:

Even with the best conditions of a Calc to table copy (PostgreSQL in my test) your data transfer may take quite some time. If you need to transfer to a database, it may be best to do this in sections - possibly 50 to 100K per.