View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.misc,soc.genealogy.computing
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Dangers of using Excel as a database

On Wed, 08 Jul 2015 09:03:19 -0400, GS wrote:

It seems that if it finds one field in a column that looks as
though it could possibly be a date, then it will treat other fields
in that column as dates too, and store them as numerals.

So even if it is formatted to *display* as text, as entered, if one
pronts it, or saves it in a a CSV style, it will print or store the
wrong value.


So for 1 *last time*...

If you *do not* use Excel's methods to import/output the data, but
use VBA standard file I/O methods OR ADODB, the data transfers *'as
is'* without being changed by Excel.

Using Excel's import methods gives Excel license to *interpret* data
type! As you're experiencing here this is not what you want to
happen*!


So you have to learn VBA and create a VBA routine for keyboard entry
to get Excel to record what you actually typed? And if you don't it
changes what you typed into something else, willy nilly?


No! You just don't use Excel's built-in import features. Once the data
is imported using VBA it can be manipulated however you like because
Excel hasn't 'interpreted' its data types during the import process.

IOW, printing your sample data over 5 versions of Excel running on 3
different OSs didn't change how the data printed. I understand that
this is what you want! Or am I mistaken?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion