Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't Microsoft Excel conform to csv standards when it opensa file from Explorer?

Hi Newsgroup Users,

I'm using Excel 2002 as that is what work has and isn't planning on
upgrading any time soon.

I've scanned the various Excel forums about csv files and being able to
open csv directly and trying to keep formatting and other considerations.

My understanding is that a CSV is that, a COMMA separated variable file.
Data elements are separated by commas but strings/literals should
indicate that commas within are not separators but part of the data.

For example, if I have a data record that looks like:

12345,678,901,090012345

I would expect Excel to handle this as four separate numeric values,
i.e. 12345 then 678 then 901 then 90012345

If that same record was written, based on what I've read about CSV file
formats, as

"12345,678,901",090012345

I'd now expect to see two values. One as the STRING 12345,678,901 and
the second a number as 90012345.

and if I passed

"12345,678,901","090012345"

I would expect to see two STRINGS the first STRING 12345,678,901 and the
second as a string 090012345.

Unfortunately, Excel takes the last string and converts it as two
numeric values and changes the first STRING to 12,345,678,901 and the
second drops the leading zero, even if the preceeding line looks like
"XXXXXXXXXXXXXXXX","XXXXXXXXXX" to try to "trick" the converter into
thinking that the data is two strings and to continue parsing as such.

I have a situation where I distribute data extracts as reports to select
users and want them to just open the attachment directly from the email
they receive.

This, unfortunately, doesn't work as expected and I have to add
"non-numeric" characters to the strings as, once the parser sees a
non-digit character, it then seems to behave as I'd want. For example,
that last line of "12345,678,901","090012345" becomes
"12345,678,901 KEY","090012345 KEY2"
and then the import treats them as two strings, unfortunately, with
"extra" data.

If you reply, please send it to the "adjusted" email address without the
(XBXBXBX) thanks.

Regards
Randy G.
Australia
Reply
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
QUESTION: Copy pivottable from excel file to another. Simon Excel Discussion (Misc queries) 0 April 26th 06 10:48 AM
Can't open an Excel file from Explorer, only from Excel Steve Taglianett Excel Discussion (Misc queries) 2 April 1st 06 12:43 PM
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
Excel updating from XML file - file path specific? Sean Excel Discussion (Misc queries) 4 August 5th 05 12:56 PM
Excel instance used with "Export to Microsoft Excel" option in Internet Explorer Karl Schweitzer Excel Discussion (Misc queries) 0 April 7th 05 06:17 PM


All times are GMT +1. The time now is 09:07 AM.

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

About Us

"It's about Microsoft Excel"