LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default EXCEL read a text string as scientific notation

I am working on a project that involes reading an Excel file, picking through
it, then creating a flat CSV file. One of the the data elements I am picking
up is a 9 character string that may be numeric, or contain one or more alpha
chatacters. Excel has a nasty habit of converting long numerics to
scientific notaion. I can overcome this by converting the "general" string
to "TEXT".



However, there is one instance where I can not get the function to
work...the string is "90333E108" ( the CUSIP for USU). Regardless, the text
string is saved properly into the CSV file. When opened in a text editor, it
reads correctly.



When opened with Excel, it is in scientific notation. Changing the field to
"text" from "scientific" still displays "9.03E+112".



Any ideas how to create an csv file that Excel will open and read correctly?



You can test this by creating an Excel workbook, format all cells as TEXT
and add the following data:



90333E108 123 2
abc 90333E108 r1312sda
123 abc 90333E108
321 123 abc
231 313 123


then use the following function:

ActiveWorkbook.SaveAs Filename:="test.csv", FileFormat:=xlCSVMSDOS,
CreateBackup:=False


("xlCVS" instead of "xlCSVMSDOS") makes no difference.



Open the file "test.csv" in note pad, you have :



90333E108,123,2

abc,90333E108,r1312sda

123,abc,90333E108

321,123,abc

231,313,123



Open in Excel and you have :



9.03E+112 123 2
abc 9.03E+112 r1312sda
123 abc 9.03E+112
321 123 abc
231 313 123







Any ideas?


Chuck















 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show value as text not scientific notation Colin Excel Discussion (Misc queries) 3 May 1st 23 07:43 PM
Prevent conversion of numeric text string to scientific notation StuckWithExcelAlas Excel Discussion (Misc queries) 1 December 28th 07 07:02 PM
Scientific Notation - I want excel to read it as a text not a numb Jim McC Excel Discussion (Misc queries) 1 February 19th 07 08:08 PM
Scientific notation in text cells miles Excel Discussion (Misc queries) 3 December 7th 06 10:59 PM
Using scientific notation in TEXT() function boopathi Excel Worksheet Functions 1 October 10th 05 08:23 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"