BASE can't copy Calc table info

I’m trying to copy info from a calc spreadsheet into a base table. Here is what happens:

out of memory./connectivity/source/drivers/jdbc/object.cxx:175

Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.7
Calc: threaded

Description: Ubuntu 22.04.5 LTS

Hope you can help, thanks

Just for starters, are you trying to copy the Calc data directly into an existing base table? or are you importing a calc spreadsheet into base as a new table? The first is not supported (without a few macros), but if the second method is used… at what point of the import process does the error occur? A few more specific details will go a long way in resolving your problem!

If I mark a sheet in Calc (Ctrl-A), select copy, then in Base use “Paste” from context menu of the destination Table an assistant opens to help importing my data. No macro needed.
.
But if I read " out of memory" my first question is: What number of records do you copy / size of records / contents of spreadsheet ?
and
Have you tried to import a small number of rows first?
Have you imported anything successfully this way? (As in: Is this a problem of size, or a general problem?)

Blockquote

If I mark a sheet in Calc (Ctrl-A), select copy, then in Base use “Paste” from context menu of the destination Table an assistant opens to help importing my data. No macro needed.

This is what I’m doing. I have 50 or so records and got the error when that error occurred. I try one record and I do not get an error but nothing is copied to the table either.

So 50 rows, but how many columns, and what is the nature of the cell contents that you are trying to copy?

If there is a JDBC error, that would imply that you are copying to a JDBC supported database , such as embedded HSQL, or accessing a different database engine with a jdbc driver. Could you tell us the kind of target database you are using?

FWIW, it is possible to specify a memory allocation size to the Java processes within LO under the Advanced options of LO’s Java configuration.

create_table.ots (57.9 KB)

The attached spreadsheet template tries to generate the SQL command which creates a new table to hold the spreadsheet data.

  1. Paste-special your values with column labels to A1 of the first sheet and follow the instructions in the yellow box.
  2. Go to the next sheet and follow the instructions in the yellow box. Choose column types as small as possible and as large as necessary. Sheet “Types” has some hints.
  3. Copy the concatenated code in the last cell or copy the cell range in column B from
    CREATE TABLE ...(
    until
    "ID" INTEGER GENERATED BY DEFAULT AS IDENTITY);
  4. Paste the code in Base’s SQL window and execute.

Executing steps 3 and 4 from my unmodified sample data generates a new, empty table with 4 columns of type DATE, VARCHAR(10), DECIMAL(6,2) and an auto-ID.

Tested with embedded Firebird and HSQL.
I reduced the availlable types to the commonly used simple types.
Having the auto-ID column at last position, this column is out of the way when pasting the sheet data.
After you are finished with database range “Data” on the first sheet, the formulas on the second sheet test if the columns are consistently filled with numbers or text.
Formatting is completely out of scope, i.e. the formulas do not try to examine if a column has dates or times or fixed decimals. Just take care that your dates and times on the data sheet are formatted according to ISO 8601 before you copy them to your database.
Red cells indicate inconsistent data types in a column. Fix the data, not anything else.

I’m trying to duplicate internet db odbl1-Employees.db and using calc sheet odb03-Employee-calc-table.ods. 31 rows x 13 cols. A miniscule size eh? I have tried one row and nothing happens. No Copy to table.