

a direct, read-only csv connection).Īll the gory details of csv import depend on the csv itself.

The source to copy from may be a table icon from the same Base document (a linked text table or view on such table) or from another Base document (e.g. The ability to link text tables is documented here: Chapter 6. Text Tablesįor any kind of copy and paste operation, you need a well prepared database table with the right column types as target and some source from where you copy the data. This database will be read-only with limited capabilities but good enough for mail merge or easy data import into Calc.Īpache OpenOffice Community Forum - Loading CSV into preformatted spreadsheets - (View topic) includes an example database “CSV_Editor.odb” (embedded HSQL linking to csv) and a “CSV_Database” (direct link).Įmbedded HSQL is documented here: Chapter 9. SQL Syntax But you can copy data into existing tables.įinally, a Base document can treat a directory of similar csv files as a pseudo-database. these databases also have the ability to link tables to csv files.Įmbedded Firebird can not link to csv filles. If your Base document is connected to some popular database server such as MySQL or PostgreSQL. In most cases where users refer to a “Base database”, they mean an embedded HSQL database. There is no such thing as a “Base database”. Thanks for replies, any feedback or assistance is much appreciated! My second question is: How can I import data from a file to a Base table which has an auto-number as its primary key? But I get an error that I’m trying to paste null values into non-nullable column and nothing gets imported. Idea was to let Base fill the ID column with unique numbers for me. I then added an empty column to the Calc table, so that it makes the other column match well and removed its tick in the wizard so it doesn’t get imported. When importing data from Calc by copying as mentioned above, I noticed that columns in the Copy table wizard don’t align as the ID column was missing in the Calc table. I don’t have an ID record for my data, I intended to use an auto-numbered column for primary key and have Base handle the numbering for me. When importing data to other and smaller tables I’ve encountered another issue I’d like to ask about.So, my first question is: How can I import data from a large csv file to a Base table? There surely is a better way, or is it? I mean, populating a database by data from a file sounds like a basic task, so I assume there is a easy way to do it. One possible solution would be splitting the file into 1 milion row chunks and import them separately, but handling about 200 files sounds daunting and I am reluctant to get started. One of my files is fairly large and Calc can only hold about 1 milion rows in a sheet. It may work fine for some cases, but importing data to Calc is a problem for me. I found a workaround where I import data into Calc, select them, copy them to clipboard and then paste to Base, which opens a Copy table wizard, which lets me import copied data. I haven’t found a way to directly import a text file into a Base database.

I have a couple of csv files holding data for a database I’ve created and I would like to import them. There are lots of other options in the reference, all just as comprehensive.I have decided to use LibreOffice Base for my personal project. Once the file is opened in Calc, I can sort chronologically and do arithmetic on the number column. It does not seem to matter if there are a different number of columns in the data: Extra columns default to Standard, extra formats are ignored. Character set to use, 0 is the system defaultĤ.

Text delimiter, 34 is the ASCII value of double quoteģ. In this tutorial tries to help you move data from other database managers into Open Office Base (aka ooBase) tables. Separator, 44 is the ASCII value of commaĢ. This command worked for me: libreoffice -calc mydata.csv -infilter=”CSV:44,34,0,1,4/2/1”Įxplanation of the contents of the infilter argumentĪfter the type, there are five comma-separated fields: 1. A comment by links to, which describes filter options. After much searching, I came to this answer.
