how to open a pipe delimited csv file in excel using java - excel

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!

Related

QGIS - Importing data as Delimited Text not CSV into Data Source Manager

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

Downloading CSV data into Excel from a Browser

So I have a script in PHP that creates tab separated CSV output.
I have a button in my HTML that works like so:
Export Data
Ideally I want the user to open this CSV file in Excel.
The issue I have here is with tab separated CSVs, the file extension, and how Excel handles all of this. For example:
download="export.csv"
Results in the Browser asking me to open this in Excel (wanted behaviour), but then once in Excel none of the columns are respected as they are tab separated (not comma separated, which Excel is obviously expecting).
download="export.xls"
Results in the Browser asking me to open this in Excel (again, wanted behaviour), but then Excel complains that the file extension and the contents do not match and gives the user a warning. If the user goes past this warning the data displays as expected, but I could do without the warning.
download="export.txt"
Results in the Browser downloading the file as a text file. Once imported into Excel, the columns are respected, but I could do with this being thought of as an Excel file like CSV files are.
download="export.tsv"
Results in the Browser downloading the file, but as this extension isnt recognized, it will need to be imported into Excel manually, which isn't what I am after. Infact, even though TSV is the most correct file extension for tab separated verse, the TXT extension seems to work more smoothly.
I am unable to set file associations on the end users machine, and I would like to avoid going down the "export your data as an actual XLXS file" route if at all possible. I would prefer to use tab separated CSVs over comma separated CSVs because the exported data contains lots of commas naturally.
EDIT:
So as per Ron Rosenfeld suggested I tried outputting a comma separated CSV file with quotes around the data - and the file loads into Excel, with columns preserved - however the quotes appear on every piece of data in every column that uses quotes.
Is it possible to not have the quotes appear?
Ideally I would prefer to have the content tab separated, but at this stage anything that allows me to open a CSV file from a browser into Excel would be great.
I want a way to download a tab separated CSV file from a browser to Excel with as little fuss as possible. How can this be achieved?
The difference between the CSV and TSV files are - as long as the creator followed some rules, that: CSV file will have comma separated values and a TSV file will have tab separated values.
For TXT files, there is no formatting specified.
CSV files are comma-delimited, so you have to use this:
sep=,
And TSV files are tab-delimited, so you have to use this:
sep=\t
If you have MS Excel installed on your computer, CSV files are closely associated with Excel.
Please, look at this post to find out what the use of sep=; for UTF-8 and UTF-16LE leads to.
It's very important to properly output UTF-8 and UTF-16LE CSV files in PHP.
So THIS POST will be informative and useful for you.
CSV means "comma separated values", so the default separator is a ,.
To change that separator to a tab, put
sep=\t
as the first line in your .csv-file (yes, you can still name it .csv). That tells excel what the delimiter character should be.
Note, that if you open the .csv with an actual text editor, it should read like
sep= (an actual tabulator character here, it's just not visible...)
This feature is not officially defined in the .csv RFC 4180, so if it works with any software other than Excel depends on that software's implementation.
I have done this before. A painful experience, which I rather not relive. but since you asked (and bountied).
Make sure your http-headers read: Content-Type: application/x-www-form-urlencoded
Make ; your separator
Don't enclose by " (This is a magic I have yet to understand).
Fingers crossed

Issue with the delimter "\t" when manipulating a CSV file with Talend

I'm doing some filters using Talend in my csv file, the delimter is tab "\t". But in the output all fields in the delimited file are displayed as a single column !
Here is my job and the setting of my output file
This is a screenshot from my csv file in the input
and this is the setiing of my tFileInputDelimited, i'm using the same metadata to read the file in the input and in the output
Thank u for your help !
Your settings are correct and the file should be delimited by \t.
But I think that the software used to open the output file is confusing you, such the case of Ms Excel which need some data conversion to indicate the correct separator. See here how to correctly import a csv file in Excel and choose the right separator.
Or you can use notepad++ and toggle the show all caracters option to see the \t as an orange arrow between fields.

How can i import arabic data into oracle database?

I have an excel file with arabic data in windows , now I want to import this file into my oracle database which installed in oracle linux 5.9.
I exported my excel file as csv format but linux couldn't display arabic data
I used sqlldr and import csv file into database but unfortunately arabic data marked as question mark.
I dont hve any problem in insert and display arabic characters when I use insert statement, my characterset is AR8MSWIN1256.
Now how can I import arabic data?
Thanks in advance.
There's a workaround that works for me
Save the excel file as "Unicode text (*.txt)
Open the text file, you'll find every column separated from neighboring columns by a "tab", copy that tab and "find+replace" it with a comma "," in the entire file.
If there's extra tabs at the end of the table it will result in a series of extra commas, delete those!
Save the file then manually change its extension from (.txt) to (.csv)
The file should now display the Arabic characters normally, and you can export it to any application as a CSV file

CSV file in Excel is not rendering correctly

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.

Resources