Question Export Access table to Existing Spreadsheet

hamrthroer

Registered User.
Local time
Yesterday, 23:46
Joined
Jul 30, 2008
Messages
33
I need to export the data from an access table to an existing excel workbook with multiple sheets. Sounds familiar I know but none of the solutions I've found here or elsewhere address the below issues.

The easy part is that all of the data needs to be exported and the spreadsheet field names are exactly the same as the field names in the table.


I need to delete the existing data in the spreadsheet prior to export or overwrite the data.

One of the fields is text stored as a number in the access table but needs to be formatted as a number.


The spreadsheet will take it from here and do the calculations.

Access table fields:
Number (Text)
LastName (Text)
FirstName (Text)
STG (Text)
Unit (Text)

Excel fields

Number (Number)
LastName (Text)
FirstName (Text)
STG (Text)
Unit (Number) This is the only field that is causing calculation issues


This process is initiated by the on click event property of a command button.
 
You could convert the string into a number using a query. After creating the query, export it as you would export the table. You shouldn't get any error messages now. That is if the field "Unit" contains numerical data only.

Query:
Code:
select *, Val(Unit) as Unit1 from Table1

HTH:D
 

Users who are viewing this thread

Back
Top Bottom