Excel's Number format change while access through ODBC

  • Thread starter Thread starter akirachan
  • Start date Start date
A

akirachan

Dear all

Did someone encounter this problem?

While I use the ODBC to access the Excel File in which the
format of the NUMBER column change.

27551234 change to 27551234.0

The ".0" is added automatically.

Any idea? Do you have solution?

thanks

Akira
 
Does this happen when you use Excel as a data source in a Mail Merge in
Microsoft Word? If so, the following instructions may help --

After you select your Excel file as a data source, you should see a
'Confirm Data Source' dialog box. From that list, choose 'MS Excel
Worksheets via DDE (*.xls)', and your formatting will be retained.

If you connect through a different source, you can format the fields in
the Word document. For example, to specify a number of decimals:

1. In Word, in the Main Document, press Alt+F9 to view the field codes.
2. Find the field code for the number. It will look something like:
{ MERGEFIELD FieldName }
3. Add a switch, to format the number with zero decimal places.
For example:
{ MERGEFIELD FieldName \# "#,##0" }
4. Press Alt+F9 to hide the field codes.
5. Save the Main Document
 
Right click the table that you have created with ODBC. This brings up
the Data Range Properties or select Data, Import External Data, Data
Range Properties.

Make sure there is a tick in the box marked "Preserve cell formatting".
 
Back
Top