MapInfo Products KnowledgeBase

Product: MapInfo Professional
Version: 8.0, 7.8
Platform: Not Platform Related
Category: Excel

Summary:
Controlling table structure of imported Excel tables (MapInfo Professional 7.8 or higher).

Question:
Controlling table structure of imported Excel tables (MapInfo Professional 7.8 or higher).

Answer:

When opening an Excel spreadsheet in MapInfo Professional v7.8 and higher, it is now possible to specify how each column is imported. For example, the user might want a 'Date' column in Excel to be a text column in MapInfo Professional.

When opening an Excel spreadsheet into MapInfo Professional, a Set Field Properties window allows the name, type and properties of any field (column) that is imported from the Excel table to be changed. The top section of the Set Field Properties window shows the Fields (column names) and Type (character, date, etc.) from the Excel spreadsheet. When selecting one of these fields, the bottom part of the window allows the MapInfo field name, data type, number of characters (for character and decimal fields) or number of decimals (for decimal fields only) to be changed.



Note:

This new functionality when opening Excel files does introduce some behavior changes. In prior releases of MapInfo Professional, it's always assumed that if the spreadsheet's timestamp is newer than the .tab file, MapInfo Professional would need to rewrite the .tab file because MapInfo Professional had no way of knowing what has changed in the Excel file. It's possible that simply some values have changed, it's also possible that rows or columns have been added or removed, or it's even possible that the data has shifted.

This behavior is now even more problematic with the introduction of a user interface to pick the column types. Adding functionality to override what MapInfo Professional thinks the data types are, there now exists a new problem when the timestamp of the spreadsheet changes. To compensate for these changes, a new registry entry (DWORD) will allow the specification of which behavior is preferred. This registry entry will need to be placed at this address:

HKEY_LOCAL_MACHINE\SOFTWARE\MapInfo\MapInfo\Common

*Tech Support always recommends backing up the systems registry before making any modifications*

When a .tab file is opened that refers to an Excel spreadsheet and the timestamp of the spreadsheet is more recent than that of the .tab file:

Default behavior
(if registry value is not present)
ignore the timestamp difference and leave the .tab file as is
ExcelRegisterOnTimestampChange = 0same as default
ExcelRegisterOnTimestampChange = 1reregister the spreadsheet resulting in a new .tab file. If the interactive keyword is used on the Open table command (the default for tables opened via the GUI), the field-type dialog will be presented.


Last Modified: 04/03/2006 10:20:35 AM
Document URL: http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/B2D30BD6BA6EEDE385256F1C006B4C0D

Controlling table structure of imported Excel tables (MapInfo Professional 7.8 or higher).^B2D30BD6BA6EEDE385256F1C006B4C0D^Y