So, in my software program I need a comma separated file. Hence, I created one using Microsoft excel entering the data. But, my software program gave error saying its not a comma separated. Hence, I just copy pasted some cell in notepad and it came out to be Tab separated.
Right now :
Owner Latitude Longitude LocationInfo
I want :
Owner,Latitude,Longitude,LocationInfo
Excel has its own special proprietary file format.
If you copy and past from an Excel sheet, what you get has no bearing on the format when you click save.
What you need to do is SaveAs and then in the popup where you can browse for a location and edit the file name, there is also a drop down (below the file name text box) where you can select various file extensions. When you pick one of those Excel will intelligently format your file for the chosen extension. Just find the one that is .csv (it may be called CSV).
Related
I am facing problem in Excel.
When I am opening my CSV file in Excel 2016 then I am getting #NAME? error
The formula I am using before converting the CSV file is:
=concatenate("+",substitute("A2"," ","+"))
and the output I am getting XLSX file as +ab+c
where A2 has value as ab c
But when I converting the same file into CSV and reopen the file then the output will change and gives as #NAME?
Summary of my exchanges with OP in comments section.
I see basically three solutions (although the third one does not meet the criteria of the OP, but I add for completeness):
Do not "open" the CSV file, but import (in an existing or new workbook): Data > Get External Data > From Text, then you go through the import steps (choose your delimiter, which will be , in your case), and then you have to define all columns as TEXT (this is the most important step, see screenshot below). This is a 100% foolproof solution.
Instead of using Excel, you could use another CSV viewer (I understood from OP that a colleague needs to inspect the file before sending onward). This might of course not be feasible in larger organizations where one is not allowed to use other tools, or if the colleague is not cooperative.
One can modify the formula so the output becomes ="+ab+c". When this is saved in CSV and imported again into Excel, it will just show +ab+c on the screen. But for OP the text in the CSV file must be just +ab+c, so therefore will not work.
Just a final remark, I could not (using Excel 2013 for Windows 10) replicate the behavior as observed by the OP. +ab+c in a CSV file never gave the #NAME? error for me when I opened the file; however, once I clicked in the cell, Excel would not let me ENTER it, unless I added a ' to indicate it was text; but I still could ESC and leave the cell alone).
I did not do any exhaustive testing, but I observed the following :
if the text starts with = you get the error always (except if followed by a text string in double quotes "...");
if it starts with + or -, there must be another operator and number also. So +ab+3 gave an error, but +b1+a not.
So maybe the behavior of Excel is different across versions, or any other settings influence this.
Just to illustrate, herewith a screenshot from the Text Import Wizard (which you find under Data > Get External Data > From Text. And in this final step (actually, you still get another step where you have to define where Excel has to put the text, either in a new worksheet, or in an existing worksheet) you have to select all columns (with shift or ctrl) and select Text as the Column data format.
I'm working in a solution that creates a .csv file in a server and download it to the user machine.
I would like to download it as a .xlsx file.
I have access to the server using SQLPlus (where I can use command lines if necessary) and I know the server does not have Excel installed.
Is that a way to convert the .csv file?
Thanks
If you want the .csv to be an .xlsx, then open blank Excel document.
Note: I am using Excel 2013.
Make sure you have clicked in top left cell, A1, and that it is
blank.
Click "DATA" tab at the top.
Click "From Text" option.
It will open up browsing option.
Find the .csv file you want to open/"convert".
Click import.
Once it is open, you can pick to have it Delimited by tabs, spaces, or commas.
Click next.
Pick the delimiters you need it separated by, so that it will fill out the columns.
Click finish.
It will ask where to put, and it you selected A1 in the steps above it will default there and just click okay.
Now save the file as an .xlsx file and you are done.
I am generating CSV files. My first row it is column names, and it looks like
User ID;First Name;Last Name;Email;...
But if I will change User ID to ID, MS office cannot open this CSV and shows me error
Cannot read record(number of record)
But this file opens correctly on, Notepad++. I am using Excel 2013. Any ideas what is wrong?
You can solve the problem by inserting the following simple text at the beginning (the first line) of your .csv file:
sep=;
This will not be seen when the file is opened in Excel. What it will do - it will explicitly tell Excel that the delimiter is ;, and values will be separated into separate cells. Also, you will be able to use ID as the title of a column. Unfortunately, I cannot answer why Excel does not like it when you use this title at the beginning of the file.
I have lines of data in a text file that I want to open in Excel.
Each line represents different columns which are separated by a comma.
If my file's extension is CSV, the file association is showing the Excel icon on the file and Excel opens the file immediately, sorting rows and columns just fine.
If my file's extension is not CSV, say .ABC, then I need to use Excel the following way: File->Open then I need to use the Text Import Wizard and specify that the delimiter is a comma.
Is there a way to set up my computer (a register to edit?) so it forces Excel to open my .ABC file as a CSV file?
If you are on windows you can change the program that Windows uses to open all files of the same type. In your case .ABC.
1) Right-click the file you want to change and then click Choose default program.
Click the program you want to use to open the file. In this case EXCEL.
If you want all files of that type to open in the same software program, select the Always use the selected program to open this kind of file check box, and then click OK.
If you want only that file to open in the software program this one time, clear the Always use the selected program to open this kind of file check box, and then click OK.
I hope it helps.
I am encountering what I believe to be a strange issue with Excel (in this case, Excel 2007, but maybe also Excel 2003, but don't have access to it as I write this).
I can reliably convert some server data over into a tab-delimited format (been doing this for years) and then open it using Excel - no issue.
However, what seems to be happening is if I have an html <table> inside one of the fields, it looks like Excel 2007 thinks it should be converting the table into rows and columns inside Excel (not what I want). As you might imagine, this throws off the entire spreadsheet.
So question is, is there any way to set up excel to NOT do this (perhaps some setting in Excel that pertains to reading tab delimited files), or am I missing something?
Thanks.
Save your file as .txt
Now open the file in excel using Drag and Drop (rather than double clicking your hookey .xls)
Slightly more work to open the file, but your tab text formatting will now be respected.
When you open the tab-delimited file, you are shown an import mapping dialog that lets you pick each columns' data type (date, text, currency, etc.). For the columns that have HTML data present, choose text. This will tell it basically to import as-is and not try to automatically parse the data into a derived format.
Excel 2003 does the same. I don't think there is a way to do it with a config because Excel finds delimiters in the html table and breaks the html in cells and columns as it does for the other columns.
If the column containing html is always the same, you can use JYelton suggestion of renaming the file as csv and record a small VBA macro to load the file selecting automatically the html column as text in the import mapping dialog and you load the file calling the macro instead of double-clicking on the file.
If nothing else, import it into OpenOffice.org Calc, save as an .xls file, then open in Excel.