Intelligent type mapping for MS Excel export tools

Unlike popular relational databases, MS Excel has justdatetime (like '04/08/1977 13:14:15'), "pure" date
a few data types and CSV does not store any(like '11/20/2009') and "pure" time types (like '17:05:21'), so
information about types at all. That's why straighteach column will be casted to the most appropriate
conversion gives poor results. To improve this situationtype at the end of conversion process. If the column
Intelligent Converters implement smart type mappingcontains both "pure" date and "pure" time values, the
algorithm in export tools for MS Excel. The main ideaprogram will convert it into string to avoid data loss.
of this algorithm is to collect information about type ofIntelligent types mapping algorithm is also applied to
each field converted and then refine column types atdirect migration from MS Excel spreadsheet. For
the end of conversion process.example MS Excel does not distinguish INTEGER and
This algorithm produces best result when convertingDOUBLE types. In view of this fact all MS Excel
from Comma Separated Values (CSV) files. Bynumbers are initially converted into DOUBLE with
default all values from CSV files are converted asmaximum precision to avoid data loss.
text. But after analyzing all data, Intelligent ConvertersAssume that some column of MS Excel spreadsheet
export tools for MS Excel will cast certain columns tocontains the following values: 
numbers or dates. The product is trying to interpret1.000000000000000e+000 2.200000000000000e+001
every field as date or number using both Windows3.330000000000000e+002
API functions and its own patterns. Once a column hasDuring conversion process the program analyzes each
been failed to be treated as date or number, thevalue in that column to cast types in the most intelligent
converter just will skip it in next records to get betterway. Since all values allow more precise type mapping,
performance of the conversion process.the converter will change the column type to INT at
Let's see how smart type mapping works on example.the end of conversion process.
Assume that source CSV file contains date values inIntelligent type mapping algorithm saves a lot of time
one of columns. While migrating CSV data toand allows automate export data from MS Excel
database the conversion tool tries to interpret everyspreadsheets and Comma Separated Values (CSV)
field of the column as date. The converter distinguishfiles.