I downloaded the csv version of the table present in this web-page https://d-place.org/parameters/DistToCoast_km#1/30/152. In the online version of the table the first column looks like this:
0.046161698
0.046405053
0.102112618
0.102112618
2,047.307804
2,029.644235
but when I open the csv file in Excel, these values look like this:
46161698
46405053
102112618
102112618
2047307804
2029644235
Can anyone tell me how to get a file usable in Excel in which first column values are the same of the first column online version and also look the same?
you have to separate spaces with commas,
like column1,column2,column3
in your case i assume you have only 1 column like this
value1
value2
...
value n
in between the value you should not put any comma, otherwise it will be interpreted as a new column.
and your error was also that you didnt formatted excel sheets to display decimal numbers, so it cut out the zeros.
you have 2 ways:
you should format cells as text
format cells as decimal numbers
I opened the csv file directly clicking on it, without opening Excel before and clicking on Data > From text and importing the file. After opening the csv file clicking on it, Excel starts and the spreadsheet looks like this:
The I click on Data > Text to Columns > Delimiters: Comma, then I specify in the advanced settings that Decimal separator is ".", while Thousands separator is ",". After this passages, spreadsheet looks like this:
Related
I need to export a Excel sheet to cdv (easy) but I need to have this format for numbers:
102.682,35
and my csv file is doing this:
3928.5400000000027
I need to have thousands quote separator.
any idea?
Two things here. If the CSV will be imported back into an Excel spreadsheet, then having a comma as a thousands separator is a visual format issue. This means that it can be formatted to show the thousands comma once it's back in Excel. In this case, don't worry about adding a thousands comma to the CSV file, just make sure to format the cells later.
Secondly, if you really do need a thousands comma in the CSV file you can do this yourself with VBA by learning how to create a loop over your data range and write to a text file in the CSV format. Now the thing about CSV is that the "separator" doesn't have to be a "comma" (even though CSV means "comma separated values"). You can choose any character that won't be used within any value.
Typically you'd do this if a comma is likely to appear in a value such as a string:
This is a sentence, but it has a comma embedded within it.
In your case you want a comma in a number value 133,491.234. So for the separator in a CSV file, choose another character such as the vertical pipe |. Now the values in the CSV file would look like this:
Doctor|Smith, John|$142,533|Brown Eyes
Look at this website to learn to Write Data to Text File and when you're looping over the cell values and come to the value that needs the thousands comma, use the Format function similar to this:
Format(cellValue, "#,##0.00")
i am trying to create file of csv extension but i want to format it with with notepad the problem is a column includes phone numbers and the numbers start with 010******* and when i try to open it in excel it consider the column is a number value so it removes the 0 (10*******) i want to format the cell as a string value.
i tried adding "01********" but the same problem happened.
the code is :
email,phone
example#company.com,01123456789
example2#company.com,0121223456789
I have a list of SSN in my excel file (9 digits, some of which have leading zeros, no hyphen).
I keep them in the special format (numero da seguranca social in portugues) so I can keep leading zeros in the column.
I want to add ' ', to the column so that I can search them in SQL query in bulk.
When I use concatenating formula ( concatenating("'",B2,"'",",")), the leading zeros are gone.
How can I achieve the result of 00XXXXXX as '00XXXXXX', ?
Thank you!
I am not sure what your special format is, but I am guessing that if the value is xx the format makes it look like 00xx. Similar to a zip code.
So the value when you change it to text looks like xx.
I can think of 2 ways to fix it
Write a formulae which basically does what the special format does. For example it would make xx as 00xx. Then you can concatenate this new value like u mentioned earlier
Copy the values from excel to notepad and then paste it to excel again. When you copy from excel to notepad, the formatted value, i.e. 00xx will get copied to notepad which can then be pasted to excel in a separate unformatted cell.
One way of doing this is to copy your SSN column from your file and paste it into a new file all by itself. Then, while ensuring that the SSN numbers are formatted with any appropriate leading zeros, save the new file as a text/tab delimited file and close it. Now, using Excel's Open File command, select your text file and on Step 3 of 3, select Text for the Column data format. Now, you should be able to select that column of data and copy it back to your main file and perform your concatena
Did you try ''00XXXXXX' or "'00XXXXXX"? That is, add one single quote before the number and Excel interprets it as a string, not a number. If you will not do any numeric operations with it, then it should be a string.
Thank you all for your input.
I ended up using #tigeravatar 's method, which is
="'"&TEXT(B2,"000000000")&"'"&","
and it worked for me.
Thank you!
i'm new to MYSQL and i'm working on it through phpMyAdmin.
My issue is that i have imported a set of tables in after creating a database for them. I wrote some codes to obtain some values which are dates in a column and binary numbers in the second column, so i have 2 columns in total. Those date values are in the following format: dd-mm-yyyy
I want to export it to an Excel file and phpMyAdmin provides 2 exporting option which are:
CSV
CSV for MS Excel
For the first option, it exports "some" of the date values like this: ####### while there are other dates exported correctly but in this shape: dd/mm/yyyy !!
For the second option, it exports them all correctly with this date shape: dd/mm/yyyy, but all they are in one column like this:
2016-01-25;"0"
2016-01-25;"1"
Note: the imported tables are: UTF8_general_ci
I tried different formats, different things but i don't know, i couldn't have the values appearing correctly in 2 columns !!
Thanks in advance.
The hash marks ('#######') in Excel indicate that the value in that particular cell is too long to display as stated in #PerlDuck's comment. If you make the column wider you should be able to see your values. Note you can autofit any column to its values by double clicking the border between columns.
That said I think exporting to a standard CSV (comma separated value) should get you what you want. Modern editions of Excel handle raw CSV just as smoothly so I would go with that.
I don't use Excel but it looks like Excel doesn't use ';' as the column separator when you import the file. You can likely change that behaviour after you've selected the files.
I have an excel spreadsheet that has two columns. When I choose to save it as a csv file, the comma after the second column is not in place. For example, i get this:
Invoice,SID No.
156106,ELC204R8
156106,WXC2048V
Instead of this:
Invoice,SID No.,
156106,ELC204R8,
156106,WXC2048V,
How to I get the comma in right before the line break?
This as I assume you are aware is not a usual requirement/format for saved CSV file.
To achieve what you are trying to do though, you need to trick Excel into thinking you are exporting a third blank/empty column.
One way to do this is to add the single-quote character ' into a third Excel column before exporting.
I just entered a space into the first 20 rows and that solved the issue.