Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB Table Copy in Different Format

Status
Not open for further replies.

LadyDev

Programmer
Jan 29, 2003
86
0
0
US
Does anyone know of an application (or something) that allows you to copy the contents of a database table to a different format? For instance TableX contents copied into an excel spreadsheet or text document (comman delimited).
 
Not sure about the application, but if you open the table, do a "select all", then a "copy", you can paste the data into an open excel worksheet...

< M!ke >
 
You can export the table to Excel:

Goto File->Export

When prompted selected:

Microsoft Excel 97-2000 in the Save as Type

Click on the Save Formatted checkbox and click save

You now have the table in an excel spreadsheet
 
Thanks, I know. Has to be done programmatically
 
Use the TransferSpreadsheet Method

Example:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, &quot;TableName&quot;, &quot;c:\FileName.xls&quot;, True
[/blue]

HTH
Mike
 
You can also use the output to method for other datatypes.

DoCmd.OutputTo , &quot;YourTable&quot;, acFormatTXT, &quot;C:\Test.txt&quot;

The data types that you can use are:

acFormatASP
acFormatDAP
acFormatHTML
acFormatIIS
acFormatRTF
acFormatSNP
acFormatTXT
acFormatXLS

If you only want to transfer to an Excel file the transfer spreadsheet is better in my opinion.

HTH,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top