R
Rene
Hello group,
I'm one of the many struggling with excel's csv-import functionality. After
reading through this group and trying out various things I'm not much wiser
so I try to ask for a solution.
I have an application that creates a cvs file for the user with some data.
One of the columns can contain data that looks like this: "12/76" -
unfortunately excel violates the cvs-spec and does interpret this as a
(incomplete) date. It then displays "01.12.1976" for example, which is just
plain wrong and must not happen.
I tried the trick with a macro that marks all cells and sets the cell-type
to "text". Now Excel utterly corrupts the data and displays some numeric
value, probably derived from the date. The transmitted data was "12/76" and
excel now has "28095", whatever that should mean. In any case, data got
corrupted and is unusable.
Excel imports the data correct if and only if I open excel with an empty
worksheet, use the data import wizard to select the csv file, select csv
mode, select the separator char, select the afflicted column and switching
its type from standard to text and finally confirm the import at cell A1.
This works and works correctly, but is far too many steps for the users
which are not computer professionals. Also this needs to be repeated for
all csv files of that type.
Additionally, the data is server generated within a web-application and
upon generation the user can open or save the csv file directly. Opening it
directly is the one convenient way but apparently does not work without
causing data corruption through excel.
I also read about some other tricks like putting a '-sign in front of the
column-data which also works, but alters the data which again must not
happen since this data has some specific meaning and there are other
programs working on the same csv files. Also copy&pasting the line
containing this workaround also copies this char with it.
I further tried in vain to redefine the "standard" cell formatting to be
the same as "text" but this doesn't work either.
So my question to the group is: Is there any way to prevent Excel to
assume/convert data from a csv file, while still allowing the csv file to
be opened by double-clicking it which opens/starts Excel or by sending a
server-generated csv file from the webserver ?
thanks in advance
René
I'm one of the many struggling with excel's csv-import functionality. After
reading through this group and trying out various things I'm not much wiser
so I try to ask for a solution.
I have an application that creates a cvs file for the user with some data.
One of the columns can contain data that looks like this: "12/76" -
unfortunately excel violates the cvs-spec and does interpret this as a
(incomplete) date. It then displays "01.12.1976" for example, which is just
plain wrong and must not happen.
I tried the trick with a macro that marks all cells and sets the cell-type
to "text". Now Excel utterly corrupts the data and displays some numeric
value, probably derived from the date. The transmitted data was "12/76" and
excel now has "28095", whatever that should mean. In any case, data got
corrupted and is unusable.
Excel imports the data correct if and only if I open excel with an empty
worksheet, use the data import wizard to select the csv file, select csv
mode, select the separator char, select the afflicted column and switching
its type from standard to text and finally confirm the import at cell A1.
This works and works correctly, but is far too many steps for the users
which are not computer professionals. Also this needs to be repeated for
all csv files of that type.
Additionally, the data is server generated within a web-application and
upon generation the user can open or save the csv file directly. Opening it
directly is the one convenient way but apparently does not work without
causing data corruption through excel.
I also read about some other tricks like putting a '-sign in front of the
column-data which also works, but alters the data which again must not
happen since this data has some specific meaning and there are other
programs working on the same csv files. Also copy&pasting the line
containing this workaround also copies this char with it.
I further tried in vain to redefine the "standard" cell formatting to be
the same as "text" but this doesn't work either.
So my question to the group is: Is there any way to prevent Excel to
assume/convert data from a csv file, while still allowing the csv file to
be opened by double-clicking it which opens/starts Excel or by sending a
server-generated csv file from the webserver ?
thanks in advance
René