I'm doing the QGIS 3.22 Beginner’s Guide on youtube.
Getting stuck trying to import the CSV data file.
The tutorials says to go to Data Source Manager > Delimited Text > File Format, then select Regular Expression delimiter.
The issue I have is that the CSV delimited file I created in Excel, automatically selects the CSV option but I need the delimiter option.
NB - when saving the file in Excel, I selected File > Save As > CSV (Comma delimited) as instructed.
But in QGIS, when I import and select Regular Expression delimiter, it doesn't take the commas into account, i.e. it shows one column instead of four columns.
The sample CSV file is over here. https://drive.google.com/drive/folders/1_g10p7qL4nDBX1HmbD2RBtDS-m6wIfc6
It's minute 12 of this video. https://youtu.be/9seReuWjZUg
Any thoughts on how to get the delimited file to import correctly?
Thanks
I have a CSV file that has Pipe delimited, But when i open it using excel the whole data in the csv file gets into a single cell.
without changing the pipe separated to comma separated. The CSV file should properly get the values and display in co responding cell
You must choose delimiter while opening the file. Default delimiter is tabs. But check your excel settings and add comma and any other symbol as delimiter. There could be some issue with your csv file as well.
For now follow these steps:
Click on Data menu on top.
Click on From Text / CSV button:
Now explore your file and open it.
Now choose delimiter of your choice and preview data and load it.
Basically you can analyze your csv here for any issues as well.
Cheers!
I am having problems converting an MSaccess table that contains a 12 digits barcode-number field to CSV file
The barcode field is defined as text!
I tried exporting to Excel and saving the Excel file to CSV or exporting it to CSV But but that did not work either (even when the field is defined as text).
The problem is that some barcodes start with zero which gets truncated and that displays a scientific notation instead of displaying the barcode string.
My Question is: How can I generate a CSV file that is stored as an Excel spread sheet?
any help is appreciated
Dory
Nick McDermaid thanks for your comment. When looking in a text editor everything looks perfect.....You mean the people requesting it on my website are actually using it as text file and do not care about the way it looks in a spread sheet? if so then I am just chasing a wild goose! is that what you mean?
I am trying to import an excel file to postgresql using pgadmin but faced many issues here.
My original data is an excel format and the data values include many comma. So I convert excel file into csv format using delimiter (;). I could do so by unchecking "use system separators" option in excel. (This will make changes in numeric values. For example, 40.2 becomes 40,2)
When I try to import this csv file in pgadmin I got numerous errors due to data type, numeric. The pgadmin do not consider 40,2 as a numeric value. Interestingly, I could do similar thing with other dataset when I convert the other data set (txt -> csv (;)-> then import to pgadmin). It worked!
However, if I try with my data it did not work.
(excel -> txt -> csv (;) -XX-> pgadmin).
Any idea how I can address this? Maybe I would like to know other ways to generate semicolon-csv files from excel.
I had an issue with excel to csv to use after a python script to fill a database, and if you generate the csv file from windows I noticed 2 things:
the return line is not a char '\n' but \r\n
excel add some invisible char at the begin of the file.csv
hope that can help
Use psql and its \copy command:
\copy mytable FROM 'mytable.csv' (FORMAT 'csv', DELIMITER ';')
COPY won't be able to handle “,” as a decimal separator, make sure it is “.”.
I think you can export excel to csv file directly inside excel if you use Excel 2016. Choose "Export" -> Other File Types -> "CSV (Comma delimited) (*.csv)".
I think excel will put quote (") around your text column which includes "," automatically. Then you can import CSV file to data base using the normal approach.
This is the content of the excel file:
"Windows Excel","AndroMoney","20140227"
"Id","Valuta","Importo","Categoria","Sottocategoria","Data","Spese(Trasferimento Out)","Entrate(Trasferimento In)","Note","Periodicita'","Progetto","Pagatore/Beneficiario","uid"
"19","EUR","-1079.63","SYSTEM","INIT_AMOUNT","10100101","","Bank","","","","","116EUR-1079.63_26_102"
"20","EUR","-2662.9","SYSTEM","INIT_AMOUNT","10100101","","Credit Card","","","","","117EUR-2662.9_26_102"
"960","EUR","0","SYSTEM","INIT_AMOUNT","10100101","","Bank austria","","","","","265C6BD548CE41FEA0250BF4E19C392F"
"1","EUR","8","Food","Breakfast","20130326","Cash","","","","","","1EUR8_1_1"
And here is how Excel shows its content:
In another post they say it's due to the usage of the , instead of ;
Is it possible to solve the problem without changing Operating System settings?
You can select column A and go to Data - Text to Columns. Then use delimited and define , as the delimiter. This will delimit the data and show it correctly.
If you're asking how to make it delimit based on the comma when you open it, I didn't read the question that way. But instead of double-clicking the file to open, go to the Data tab and Get External Data from it, defining the delimiter.
I use a trick.
Change the extencion from CSV to TXT, the open the file with excel, define , as the delimitator character
In Excel 2010 and newer csv files are read correctly. In older versions you need to specify a separator during import in text import wizard.