Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
QUESTION: Copy pivottable from excel file to another. | Excel Discussion (Misc queries) | |||
Can't open an Excel file from Explorer, only from Excel | Excel Discussion (Misc queries) | |||
Excel crashes while opening excel file imbeddied with macros | Excel Discussion (Misc queries) | |||
Excel updating from XML file - file path specific? | Excel Discussion (Misc queries) | |||
Excel instance used with "Export to Microsoft Excel" option in Internet Explorer | Excel Discussion (Misc queries) |