Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 12th, 2004, 02:09 PM
Registered User
 
Join Date: Jul 2004
Location: , , USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export Table from Access to Excel

Hi,

I am trying to perform export of a table in Access Database to a xls spreasheet.

For this I am using the command:

DoCmd.TransferSpreadsheet acExport, 8, "Report", Me!txtExportFileName, True

However I get a tick (') in the all the data exported. This happens for the fields which are of of Type TEXT only.

The Data Columns in the xls looks something like:

'Date 'Place
'1/1/2004 'Chicago
'12/1/2003 'Seattle

Now if I change the Date field type to DATE I do not see the ticks anymore. It looks something like this:

'Date 'Place
1/1/2004 'Chicago
12/1/2003 'Seattle


Has someone faced a similar issue before.

Any solution?

TIA


Reply With Quote
  #2 (permalink)  
Old July 12th, 2004, 03:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

The tick is an Excel thing. I think it does that to differentiate text versus functions, if I remember correctly. I may be wrong, but I know that Excel put's a ' in front for a specific reason.

If you plan to do anything with the data (import to another data source) I don't think you'll have a problem.

Brian
Reply With Quote
  #3 (permalink)  
Old July 12th, 2004, 03:20 PM
Registered User
 
Join Date: Jul 2004
Location: , , USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well I found the solution:

If I use SpreadsheetType = 0 which is acSpreadsheetTypeExcel3 instead of 8 it works!!

No ticks are seen in Text Fields.

Thanks Anyways for your comments!


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Table data into an Excel SpreadSheet hewstone999 Access VBA 0 March 3rd, 2008 07:00 AM
Export Access table to a pre-formatted Excel file mccoy Access VBA 2 May 25th, 2007 08:04 AM
Export Access queries to Excel Spymaster Access VBA 2 August 18th, 2006 11:21 AM
Export an Access query to Excel Peter Martin Access 5 June 8th, 2006 06:36 AM
Export Mircosoft Excel Data to Access Table tiyyob Excel VBA 0 January 11th, 2006 06:19 AM



All times are GMT -4. The time now is 11:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.