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
SQL Update Woes in Ms Access - Operation Must Use an Updateable Query
How to Pivot Dynamically with Date as Column
Using an Alias Column in the Where Clause in Ms-SQL 2000
Set Limit for a Table Rows in SQL
Select Random Row from a Postgresql Table with Weighted Row Probabilities
SQL Server Row_Number() on SQL Server 2000
Cannot Select from Update Returning Clause in Postgres
SQL Server Export to Excel with Openrowset
Insert Data and Set Foreign Keys with Postgres
Oracle: Function Based Index Selective Uniqueness
Database Design Question - Categories/Subcategories
Foreign Key Referencing a 2 Columns Primary Key in SQL Server