Subscribe to this feed

Navigation

Recent Posts

Archive

Excel Datatype Error with MS Query

Sunday 15 Apr, 2007 - 11:34am | 0 comments |

If you are importing data into Excel or using an excel datasheet as a data source in, for example, an MS Query you can observe unexpected results as Excel tries to be cleverer than it is.

Only the first eight rows of your data are scanned to determine the datatype for the column, i.e. is it a number or is it text. If you have a data column which uses both, but, say only text appears in the first eight rows, the number values will not be displayed. You will be left with blanks instead of the values.

The workaround is that you have to explicitly define each of your data columns before you import your data. Do this before you import your data to avoid having to F2 through the fields (another datatype weakness in Excel !)

This is partly explained in Microsoft article KB141284 or Q141284

Tags: Excel |MS Query |DataType |KB141284

Add a comment
 | Link | Back to top | del.icio.us digg it furl reddit

Merge Multiple CSV Files

Sunday 01 Apr, 2007 - 14:48pm | 49 comments |

You can merge multiple csv or text files with a simple DOS command. Copy the code below into a text editor and save the file with a .bat extension. Save the file in the same folder as the csv files.

copy *.csv importfile.csv

I've used this as part of an import routine. Step one produces a set of csv files from SQL queries on an Oracle database. Step two merges all the csv files together. Step three imports a single file into Sage MMS

Tags: csv |File Import |batch files |bat

Add a comment
 | Link | Back to top | del.icio.us digg it furl reddit
Previous Next

© Eriginal Ltd 2011, all rights reserved