Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8621263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:46:53+00:00 2026-06-12T06:46:53+00:00

This is about a legacy Access 2003 database that I’ve inherited. There’s some code

  • 0

This is about a legacy Access 2003 database that I’ve inherited. There’s some code that links an Excel (97-2003) spreadsheet:

tdf.Connect = "Excel 5.0;HDR=Yes;IMEX=2;DATABASE="&strXLFileName
tdf.SourceTableName = strSourceTableName & "$"
CurrentDb.TableDefs.Append tdf

When I open the linked table afterwards, I see #Num! in place of numeric values in a column that is supposed to contain both numeric and text.

For example, in Excel:

Field1
H88
234
X65
432

Linked table in Access:

Field1
H88
#Num!
X65
#Num!

I’ve tried the following:(a) changing Excel 5.0 to Excel 8.0, which is more accurate for the format the soruce files are in; (b) importing using DoCmd.TransferSpreadsheet instead of linking.

The first still gives #Num!, while importing gives nulls.

Upgrading to later versions is not an option at the moment – there are a number of places within the code that use things that Application.FileSearch that require careful rewriting and testing.

Anyone know how to get Access 2003 to treat the “numbers” like they were text, too?

TIA!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:46:54+00:00Added an answer on June 12, 2026 at 6:46 am

    Change IMEX=2 to IMEX=1 to treat all the values as text.

    You can read more about IMEX at Connection strings for Excel 2007.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got some code that performs some legacy 'database' operation and then processes the
I'm attempting to open some database files used by a legacy application that I
This is about a web app that serves images. Since the same request will
I am setting up Castle Active Record to access a legacy database on an
I asked this question about rewriting old ugly links into seo friendly ones. I
I have an application (Legacy code) that contains interface Icomponent with save() methods and
I'm working with a legacy database in Oracle and some of my tables have
Is there a database that can be embedded in a Java program but also
The HTML5 draft specifies (at the moment at least), that the URI about:legacy-compat can
I'm trying to modulise legacy code and in doing so I've come across this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.