Import Excel Data into Postgresql 9.3

Import excel sheet to Postgresql database

Try This

COPY Your_Table FROM 'D:/column.csv' WITH DELIMITER ';' CSV HEADER;

how to import excel file (XLSX) to mongoDB

You cannot import an XLSX file into MongoDB directly. However, what you can do with an Excel spreadsheet is save it as a CSV file, then use mongoimport to import it into MongoDB. You can find the documentation for mongoimport here, but in any case, the command you need to run should look something like the following:

mongoimport --db myDb --collection myCollection --type csv --headerline --file /path/to/myfile.csv

In the command above, the --headerline flag indicates that the first line in your file contains the name of the fields. There are many other options you can use depending on your needs. These are highlighted in the documentation.

Can I automatically create a table in PostgreSQL from a csv file with headers?

You can't find anything in the COPY documentation, because COPY cannot create a table for you.

You need to do that before you can COPY to it.



Related Topics



Leave a reply



Submit