ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   csv converting numbers to scientific format (https://www.excelbanter.com/excel-discussion-misc-queries/29826-csv-converting-numbers-scientific-format.html)

JR

csv converting numbers to scientific format
 
I've imported a series of numbers and when I save it in csv format, it
changes the numbers to the scientific format unless it's under 10 digits.
I've tried converting to text, multipling by 1, but nothing seems to keep it
formatted as a number? Each time it looks like it will work, I save it and
reopen it, only to find the numbers converted to scientific format again.

I'm completely confused as to why it won't store it as a general number if
over ten digits?
--
JR Wireless

Dave Peterson

When you opened the .CSV file in Notepad (say), were those numbers in scientific
notation?

Or was it when you reopened the .csv file in excel.

And if it's just the format in excel, you could always just change the format of
that column(s) after you open the file.

JR wrote:

I've imported a series of numbers and when I save it in csv format, it
changes the numbers to the scientific format unless it's under 10 digits.
I've tried converting to text, multipling by 1, but nothing seems to keep it
formatted as a number? Each time it looks like it will work, I save it and
reopen it, only to find the numbers converted to scientific format again.

I'm completely confused as to why it won't store it as a general number if
over ten digits?
--
JR Wireless


--

Dave Peterson

JR

Dave,

Yes, the numbers showed in scientific notation when I opened it with
notepad. I would just change it after opening the file, but the file is being
uploaded into another DB, and it needs to be automated. Any idea why it
won't hold the format change when saving it as a csv file?

--
JR Wireless


"Dave Peterson" wrote:

When you opened the .CSV file in Notepad (say), were those numbers in scientific
notation?

Or was it when you reopened the .csv file in excel.

And if it's just the format in excel, you could always just change the format of
that column(s) after you open the file.

JR wrote:

I've imported a series of numbers and when I save it in csv format, it
changes the numbers to the scientific format unless it's under 10 digits.
I've tried converting to text, multipling by 1, but nothing seems to keep it
formatted as a number? Each time it looks like it will work, I save it and
reopen it, only to find the numbers converted to scientific format again.

I'm completely confused as to why it won't store it as a general number if
over ten digits?
--
JR Wireless


--

Dave Peterson


Dave Peterson

Before you save the file as a .csv, make sure you change the number format to
something besides general (Number 0 decimal places???).

JR wrote:

Dave,

Yes, the numbers showed in scientific notation when I opened it with
notepad. I would just change it after opening the file, but the file is being
uploaded into another DB, and it needs to be automated. Any idea why it
won't hold the format change when saving it as a csv file?

--
JR Wireless

"Dave Peterson" wrote:

When you opened the .CSV file in Notepad (say), were those numbers in scientific
notation?

Or was it when you reopened the .csv file in excel.

And if it's just the format in excel, you could always just change the format of
that column(s) after you open the file.

JR wrote:

I've imported a series of numbers and when I save it in csv format, it
changes the numbers to the scientific format unless it's under 10 digits.
I've tried converting to text, multipling by 1, but nothing seems to keep it
formatted as a number? Each time it looks like it will work, I save it and
reopen it, only to find the numbers converted to scientific format again.

I'm completely confused as to why it won't store it as a general number if
over ten digits?
--
JR Wireless


--

Dave Peterson


--

Dave Peterson

JR

Dave,

I saved the file as .xls, with the column formated as number. In .xls file
type, it isn't a problem, but when I then save the file as a .csv, it again
converts it to scientific. I've got a headache now from pounding my head
against the wall...
--
JR Wireless


"Dave Peterson" wrote:

Before you save the file as a .csv, make sure you change the number format to
something besides general (Number 0 decimal places???).

JR wrote:

Dave,

Yes, the numbers showed in scientific notation when I opened it with
notepad. I would just change it after opening the file, but the file is being
uploaded into another DB, and it needs to be automated. Any idea why it
won't hold the format change when saving it as a csv file?

--
JR Wireless

"Dave Peterson" wrote:

When you opened the .CSV file in Notepad (say), were those numbers in scientific
notation?

Or was it when you reopened the .csv file in excel.

And if it's just the format in excel, you could always just change the format of
that column(s) after you open the file.

JR wrote:

I've imported a series of numbers and when I save it in csv format, it
changes the numbers to the scientific format unless it's under 10 digits.
I've tried converting to text, multipling by 1, but nothing seems to keep it
formatted as a number? Each time it looks like it will work, I save it and
reopen it, only to find the numbers converted to scientific format again.

I'm completely confused as to why it won't store it as a general number if
over ten digits?
--
JR Wireless

--

Dave Peterson


--

Dave Peterson


JE McGimpsey

Does saving the file to csv really convert it to scientific notation
(i.e., if you open the resulting file in NotePad, do you see scientific
notation?), or are you seeing scientific notation when you import it
back into XL (where the parser will convert it)?


In article ,
"JR" wrote:

I saved the file as .xls, with the column formated as number. In .xls file
type, it isn't a problem, but when I then save the file as a .csv, it again
converts it to scientific. I've got a headache now from pounding my head
against the wall...


JR

It really converts it to scientific notation, when I open it with notepad, I
see the scientific notation. If I change it to .xls format, it will remain in
the number format, its only when I convert it to .csv that it forces it into
the scientific notation.
--
JR Wireless


"JE McGimpsey" wrote:

Does saving the file to csv really convert it to scientific notation
(i.e., if you open the resulting file in NotePad, do you see scientific
notation?), or are you seeing scientific notation when you import it
back into XL (where the parser will convert it)?


In article ,
"JR" wrote:

I saved the file as .xls, with the column formated as number. In .xls file
type, it isn't a problem, but when I then save the file as a .csv, it again
converts it to scientific. I've got a headache now from pounding my head
against the wall...



Dave Peterson

In my simple tests, when I put those large numbers in a cell, then formatted it
as Number (0 decimals), then saved as a .csv file, the data didn't get converted
to scientific notation in the text file (when checked in a text editor).

I used xl2003 for my testing--but I don't think this behavior changed.

So....

What version of excel are you using?
What is the value in one of those cells?
What is the number format for that cell?



JR wrote:

It really converts it to scientific notation, when I open it with notepad, I
see the scientific notation. If I change it to .xls format, it will remain in
the number format, its only when I convert it to .csv that it forces it into
the scientific notation.
--
JR Wireless

"JE McGimpsey" wrote:

Does saving the file to csv really convert it to scientific notation
(i.e., if you open the resulting file in NotePad, do you see scientific
notation?), or are you seeing scientific notation when you import it
back into XL (where the parser will convert it)?


In article ,
"JR" wrote:

I saved the file as .xls, with the column formated as number. In .xls file
type, it isn't a problem, but when I then save the file as a .csv, it again
converts it to scientific. I've got a headache now from pounding my head
against the wall...



--

Dave Peterson


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com