ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   16 digit numbers (https://www.excelbanter.com/excel-discussion-misc-queries/211755-16-digit-numbers.html)

Rich[_8_]

16 digit numbers
 
Hi,

The team at work have to export a file from an app one column which contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text, which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process ?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **

porter444

16 digit numbers
 
Can you send me a sample file Rich? Please do not include any confidential
information.

Email to:
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:

Hi,

The team at work have to export a file from an app one column which contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text, which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process ?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **


Niek Otten

16 digit numbers
 
Hi Scott,

These newsgroups are meant to share solutions, so we can all learn from each
other.

Sending files via email should only be done if nothing else helped and there
is no hope for a shared solution anymore.
Even then any solution found should be posted to the newsgroup.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"porter444" wrote in message
...
Can you send me a sample file Rich? Please do not include any
confidential
information.

Email to:
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific
notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process
?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **



Chip Pearson

16 digit numbers
 
Change file from CSV to txt (change the file extension from .csv to
..txt) and use the Import Text tool to import the file. This will allow
you to specify the formatting of the problematic values.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Wed, 26 Nov 2008 20:53:32 -0000, "Rich"
wrote:

Hi,

The team at work have to export a file from an app one column which contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text, which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process ?


Rich[_8_]

16 digit numbers
 

"Chip Pearson" wrote in message
...
Change file from CSV to txt (change the file extension from .csv to
.txt) and use the Import Text tool to import the file. This will allow
you to specify the formatting of the problematic values.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Wed, 26 Nov 2008 20:53:32 -0000, "Rich"
wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process ?



Thanks Chip,

The users already have this solution, it's not really what they're looking
for, as it involves too many steps, I was looking for something that won't
scare excel beginners.
--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm



** Posted from http://www.teranews.com **

porter444

16 digit numbers
 
Whatever dude... you should probably mind you own business.

Rich[_8_]

16 digit numbers
 

"Niek Otten" wrote in message
...
Hi Scott,

These newsgroups are meant to share solutions, so we can all learn from
each other.

Sending files via email should only be done if nothing else helped and
there is no hope for a shared solution anymore.
Even then any solution found should be posted to the newsgroup.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"porter444" wrote in message
...
Can you send me a sample file Rich? Please do not include any
confidential
information.

Email to:
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues
use
excel to open the csv, but the long number reverts to scientific
notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process
?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **



Scott,

Thanks for the offer, Niek you're right too.

I've posted the example to http://www.richdavies.com/emample2611.xls


The product code is 5171261108300966.

Excel turns it into
5.17126E+15


When you convert it by formatting as number, it becomes 5171261108300960


--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm





** Posted from http://www.teranews.com **

Rich[_8_]

16 digit numbers OOPS
 

"Rich" wrote in message
...

"Niek Otten" wrote in message
...
Hi Scott,

These newsgroups are meant to share solutions, so we can all learn from
each other.

Sending files via email should only be done if nothing else helped and
there is no hope for a shared solution anymore.
Even then any solution found should be posted to the newsgroup.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"porter444" wrote in message
...
Can you send me a sample file Rich? Please do not include any
confidential
information.

Email to:
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues
use
excel to open the csv, but the long number reverts to scientific
notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open
with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this
process ?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **



Scott,

Thanks for the offer, Niek you're right too.

I've posted the example to http://www.richdavies.com/emample2611.xls


The product code is 5171261108300966.

Excel turns it into
5.17126E+15


When you convert it by formatting as number, it becomes 5171261108300960


--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm



Oops !
Should have been http://www.richdavies.com/example2611.xls

--
--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm







** Posted from http://www.teranews.com **

porter444

16 digit numbers
 
The link is taking me to a 404 page.
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:


"Niek Otten" wrote in message
...
Hi Scott,

These newsgroups are meant to share solutions, so we can all learn from
each other.

Sending files via email should only be done if nothing else helped and
there is no hope for a shared solution anymore.
Even then any solution found should be posted to the newsgroup.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"porter444" wrote in message
...
Can you send me a sample file Rich? Please do not include any
confidential
information.

Email to:
--
If my posting was helpful, please click the "Yes" button.

ROCK ON!,

Scott


"Rich" wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues
use
excel to open the csv, but the long number reverts to scientific
notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process
?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


** Posted from http://www.teranews.com **



Scott,

Thanks for the offer, Niek you're right too.

I've posted the example to http://www.richdavies.com/emample2611.xls


The product code is 5171261108300966.

Excel turns it into
5.17126E+15


When you convert it by formatting as number, it becomes 5171261108300960


--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm





** Posted from http://www.teranews.com **


Dave Peterson

16 digit numbers
 
Maybe...

Option Explicit
Sub testme01()

Dim CSVFileName As Variant
Dim TxtFileName As String

Dim TempWks As Worksheet

CSVFileName = Application.GetOpenFilename(Filefilter:="CSV Files, *.csv")
If CSVFileName = False Then
Exit Sub 'user hit cancel
End If

TxtFileName = CSVFileName & ".txt"

FileCopy Source:=CSVFileName, Destination:=TxtFileName

Workbooks.OpenText Filename:=TxtFileName, _
Origin:=437, StartRow:=1, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, Comma:=True, _
Space:=False, Other:=False, _
FieldInfo:=Array(1, 2)

Set TempWks = ActiveSheet

'copy to a new workbook
'so we can close and kill the text file
TempWks.Copy
TempWks.Parent.Close savechanges:=False
Kill TxtFileName

End Sub

You'll want to record a macro when you open one of your text files (after you've
renamed the .csv to .txt) so that you can get that .opentext line
correct--especially the delimiters and the fieldinfo stuff.



Rich wrote:

Hi,

The team at work have to export a file from an app one column which contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text, which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process ?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm

** Posted from http://www.teranews.com **


--

Dave Peterson

Niek Otten

16 digit numbers
 
<mind you own business

I do. This is my business.
Thanks for your helpful comments.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"porter444" wrote in message
...
Whatever dude... you should probably mind you own business.



Rich[_8_]

16 digit numbers
 

"Dave Peterson" wrote in message
...
Maybe...

Option Explicit
Sub testme01()

Dim CSVFileName As Variant
Dim TxtFileName As String

Dim TempWks As Worksheet

CSVFileName = Application.GetOpenFilename(Filefilter:="CSV Files,
*.csv")
If CSVFileName = False Then
Exit Sub 'user hit cancel
End If

TxtFileName = CSVFileName & ".txt"

FileCopy Source:=CSVFileName, Destination:=TxtFileName

Workbooks.OpenText Filename:=TxtFileName, _
Origin:=437, StartRow:=1, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=False, Semicolon:=False, Comma:=True, _
Space:=False, Other:=False, _
FieldInfo:=Array(1, 2)

Set TempWks = ActiveSheet

'copy to a new workbook
'so we can close and kill the text file
TempWks.Copy
TempWks.Parent.Close savechanges:=False
Kill TxtFileName

End Sub

You'll want to record a macro when you open one of your text files (after
you've
renamed the .csv to .txt) so that you can get that .opentext line
correct--especially the delimiters and the fieldinfo stuff.



Rich wrote:

Hi,

The team at work have to export a file from an app one column which
contains
16 digits product codes. The app only exports as a CSV. My colleagues use
excel to open the csv, but the long number reverts to scientific
notation,
and formatting the cell to number corrupts the number slightly.

The only work around I can offer if to rename the CSV as text, open with
excel then go through the wizard and set the offending column to text,
which
works, but is over complicated and cumbersome for the team.

Can anyone offer an easy solution or a macro method to ease this process
?

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm


Thanks Dave,

I'll give that a try and report back....

--
Rich
http://www.richdavies.com
http://www.richdavies.com/excel.htm
http://www.richdavies.com/fantasy-football.htm



** Posted from http://www.teranews.com **


All times are GMT +1. The time now is 11:31 PM.

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