473,473 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

TransferSpreadsheet Import Errors

I'm using TransferSpreadsheet to import an Excel file in to MS Access
2003.

DoCmd.TransferSpreadsheet acImport, 8, strTable, strFileName, True, ""

One of the columns in the Excel file is a number formatted field, but
occasionally a cell in that column will not have a value.

When that happens, the code is not returning an error, but I end up
with a table of the Import Errors where that blank field value could
not be imported.

Does anyone know how to to get TransferSpreadsheet to allow these
blank cells and not give me the import error tables?
Sep 5 '08 #1
3 10946
ARC
Look at the design of the table that the spreadsheet is being imported into.
In the column in question, check the settings for "Required" and "Allow zero
length", as these may not be set properly.

Hope this helps,

"Icarus" <tj******@gmail.comwrote in message
news:58**********************************@34g2000h sh.googlegroups.com...
I'm using TransferSpreadsheet to import an Excel file in to MS Access
2003.

DoCmd.TransferSpreadsheet acImport, 8, strTable, strFileName, True, ""

One of the columns in the Excel file is a number formatted field, but
occasionally a cell in that column will not have a value.

When that happens, the code is not returning an error, but I end up
with a table of the Import Errors where that blank field value could
not be imported.

Does anyone know how to to get TransferSpreadsheet to allow these
blank cells and not give me the import error tables?
Sep 5 '08 #2
On Sep 5, 10:26*am, "ARC" <PCES...@PCESoft.invalidwrote:
Look at the design of the table that the spreadsheet is being imported into.
In the column in question, check the settings for "Required" and "Allow zero
length", as these may not be set properly.

Hope this helps,

"Icarus" <tjmos...@gmail.comwrote in message

news:58**********************************@34g2000h sh.googlegroups.com...
I'm using TransferSpreadsheet to import an Excel file in to MS Access
2003.
DoCmd.TransferSpreadsheet acImport, 8, strTable, strFileName, True, ""
One of the columns in the Excel file is a number formatted field, but
occasionally a cell in that column will not have a value.
When that happens, the code is not returning an error, but I end up
with a table of the Import Errors where that blank field value could
not be imported.
Does anyone know how to to get TransferSpreadsheet to allow these
blank cells and not give me the import error tables?- Hide quoted text -

- Show quoted text -
The TransferSpreadsheet is creating the table that it is importing
into. Can I change the field properties as part of
TransferSpreadsheet?
Sep 5 '08 #3
ARC
The way I have mine set up is that I have a table that I specify in the
transferspreadsheet statement. I match up the column headinigs of the xls to
the table, where I can define table properties, such as the required
property:

DoCmd.TransferSpreadsheet acImport, 8, "ImportParts", strFileImport, true

So my temp table for holding the import already exists and is named
"ImportParts".

Hope this helps,

"Icarus" <tj******@gmail.comwrote in message
news:a8**********************************@8g2000hs e.googlegroups.com...
On Sep 5, 10:26 am, "ARC" <PCES...@PCESoft.invalidwrote:
Look at the design of the table that the spreadsheet is being imported
into.
In the column in question, check the settings for "Required" and "Allow
zero
length", as these may not be set properly.

Hope this helps,

"Icarus" <tjmos...@gmail.comwrote in message

news:58**********************************@34g2000h sh.googlegroups.com...
I'm using TransferSpreadsheet to import an Excel file in to MS Access
2003.
DoCmd.TransferSpreadsheet acImport, 8, strTable, strFileName, True, ""
One of the columns in the Excel file is a number formatted field, but
occasionally a cell in that column will not have a value.
When that happens, the code is not returning an error, but I end up
with a table of the Import Errors where that blank field value could
not be imported.
Does anyone know how to to get TransferSpreadsheet to allow these
blank cells and not give me the import error tables?- Hide quoted text -

- Show quoted text -
The TransferSpreadsheet is creating the table that it is importing
into. Can I change the field properties as part of
TransferSpreadsheet?

Sep 5 '08 #4

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

Similar topics

1
by: O'Donnell Tribunal | last post by:
Hello Everybody, I am using the TransferSpreadsheet method to import spreadsheets for processing. say my code looks like this: DoCmd.TransferSpreadsheet acImport, 0, _ "tbltempImport1", ""...
0
by: Mick Hardy | last post by:
Hi, Has anyone seen this weird behaviour or have any suggestions or can anyone reproduce it? The history: I converted a large third party DB from 97 to XP and it uses the...
1
by: Bob Hynes | last post by:
Hi All, In Access97 I'm using a TransferSpreadsheet acExport in vba code and it errors when the spreadsheet I'm exporting does not exist. If I create a empty spreadsheet with the name I use in the...
6
by: sara | last post by:
I have a procedure to automate bringing several Excel files into our Access tables, on a daily basis. The problem is that if the user has a problem, and tries to run the import again (maybe 3...
4
by: Tom Louchbaum | last post by:
I try to use this command to import a spreadsheet "DoCmd.TransferSpreadsheet acImport, 8, tablename & " -tbl", DIR & "Book2.xls", True" and it errors out. If I try to import that same...
0
by: Jer | last post by:
I am using TransferSpreadsheet from an ADP file to import an Excel spreadsheet into an MSDE database. On one computer, when I run the code to import the spreadsheet, it prompts for an SQLServer...
1
by: keri | last post by:
Hi, I'm automating an import done manually through Get External Data I have assigned the below code to the onclick event of a command button on a form but I am getting errors. ...
5
by: D.Stone | last post by:
I'm getting a problem with importing an Excel spreadsheet into a table in a SQL Server 2000 back-end. I'm doing this in VBA in an onClick event proc in an Access 2003 project. The target table's...
4
by: ambmil | last post by:
I am using transfertext and transferspreadsheet in VBA to import an excel file (.csv or .xls) into access 2003. Some of the fields are failing (I am getting an import error file), but I am not...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
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.