We help IT Professionals succeed at work.

How could you create a formatting error in the attached Excel file so that the DoCmd.TransferSpreadsheet command does not work properly?

zimmer9
zimmer9 asked
on
Medium Priority
370 Views
Last Modified: 2012-05-11
I am developing an Access application using Access 2003 with an MDB type file.
My Access application imports an Excel file into an Access table via the DoCmd.TransferSpreadsheet command.

A sample Excel file for my application follows in the File attachment section.

Do you know how I could modify the attached Excel file to cause a format error to occur when the DoCmd.TransferSpreadsheet command executes?

I want to test my application to ensure that it can handle an error in the format of the Excel file to be imported.


DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Bank Credits (A)", filenm, False, "Bank Credits (A)!A:N"
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Bank Debits (B)", filenm, False, "Bank Debits (B)!A:N"
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Book Debits (C)", filenm, False, "Book Debits (C)!A:N"
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Book Credits (D)", filenm, False, "Book Credits (D)!A:N"
555--02-15-2011.xls
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Adding text in a numerical or date column will give you an error.
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.