473,467 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem using mixed data from Excel

Office 2003 (but may also occur on others).

Create new Excel file. Enter a column of data like this:
Column1
aaa
bbb
ccc
ddd
eee
111
222
333

Create a new database and create a linked table to this workbook.
Open the table view.
Observe:
aaa
bbb
ccc
ddd
eee
#Num!
#Num!
#Num!

Check the table design and observe the data type for that column is
Text255.
Why is Access too stupid to display the data? Obviously in normal
Access (Jet) tables a Text255 column can have a value of "111".
One work around is to "prep" the Excel file by putting a single quote
in front of all numeric values. Ugly!
Any better ideas?

Thanks,

-Tom.

Jan 12 '06 #1
5 1637
The problem is Excel, not Access. Take your Excel and save it as a csv
then link to that in Access. Or import the Excel spreadsheet and
define the field as text. It'll work.

The problem: Excel is saving a number as a number. Since it is not
field driven, it designs each cell independently. That is one of the
fundamental differences between a database and a spreadsheet.

Jan 12 '06 #2
Set tdf = DBEngine(0)(0).TableDefs("Sheet1")
tdf.Connect = Replace(tdf.Connect, "IMEX=2", "IMEX=1")
tdf.RefreshLink

Jan 12 '06 #3
On 11 Jan 2006 17:53:48 -0800, "Lyle Fairfield"
<ly***********@aim.com> wrote:

10 points!
I added this code to the reattach logic, renamed it to LF_Akbar, and
it worked.
Thanks a bunch.

-Tom.

Set tdf = DBEngine(0)(0).TableDefs("Sheet1")
tdf.Connect = Replace(tdf.Connect, "IMEX=2", "IMEX=1")
tdf.RefreshLink


Jan 12 '06 #4
On 11 Jan 2006 17:45:34 -0800, "Dean" <de**@coveyaccounting.com>
wrote:

Thanks. If Lyle hadn't made his great suggestion, that's exactly the
route I would have taken.

-Tom.

The problem is Excel, not Access. Take your Excel and save it as a csv
then link to that in Access. Or import the Excel spreadsheet and
define the field as text. It'll work.

The problem: Excel is saving a number as a number. Since it is not
field driven, it designs each cell independently. That is one of the
fundamental differences between a database and a spreadsheet.


Jan 12 '06 #5
LOL!
Glad it helped.

Jan 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
1
by: barma16 | last post by:
I've hit a bit of a brick wall here, and could use some advice. I have an Access application whose output is a four-tab Excel spreadsheet where three of the four tabs are the result of database...
4
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
5
by: Rob T | last post by:
I have a routine that imports a list of part numbers into a dataview: strExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & boxFile.Text & ";Extended Properties=""Excel 8.0;HDR=NO"""...
5
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
0
by: genojoe | last post by:
I have a 4 column, 6 row Excel sheet with all cells formatted for text: 1 1 a a 2 2 b b 3 3 c c a 4 d 1 b 5 e 2 c 6 f 3 I have the following schema.ini:
4
by: andrewmac | last post by:
I hope someone can help - I am new to Access so please be patient. I have a list of about 100 equity tickers in a column in Excel formatted as Text. I am trying to copy and paste into a field...
2
by: Fabian Braennstroem | last post by:
Hi, I would like to delete a region on a log file which has this kind of structure: #------flutest------------------------------------------------------------ 498 1.0086e-03 2.4608e-04...
11
by: nartla | last post by:
Hello, I work on an app developped with Access/VBA and communicating with a SQL Server database via ODBC. My problem is that I have to manage a big string which can be 0 to 1024 characters...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.