OutputTo command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the outputo command as the following procedure

DoCmd.OutputTo acSendForm, "G1_Data", "Microsoft Excel 97-2003(.xls)",
"C:\Allocsyt\Test.xls", False, , 0

This procedure creates a excel file but with the format microsoft Excel
5.0/95.

Question.
How can i use the procedure above and generating excel file with the format
Microsoft Excel 97-2003?

Thanks
 
Use the TransferSpreadsheet method instead, which allows you to specify a
specific format.
 
Hi Douglas,
I tried to use TransferSpreadsheet method but doesn't do what I want.

I need export data from datasheet view form where the format numbers and the
columns width are properly formated.

If I use OutputTo method it works fine, except the excel format. is
microsoft 5.0/95 and not Microsoft Excel 97-2003.

With this method, one click I export the data from datasheet view with the
same format that we see in the form.

I tried to use TransferSpreadsheet but it export only tables and keep the
original columns format in excel. The titles in excel is not format

So, do you have any solution to use OutputTo method and give the porperly
excel formtat?

Thanks
 
AFAIK, there's no way to change how OutputTo works.

You could, however, use TransferSpreadsheet, and then use Automation to
format the data in Excel.
 
If there is not solution I think is much better and quickly use OutputTo
method and with automation save as for Microsoft Excel 97-2003 format.

Is it possible to export data from recordset to excel using
TransferSpreadsheet method?

Thanks
 
If you're asking whether a instantiated recordset can be exported to Excel
using TransferSpreadsheet, the answer's no (and the same's true of the
OutputTo method).

You can, however, use the GetRows method of the recordset in conjunction
with Automation.
 
With automation I use CopyRecordsetFrom method. I never used GetRows method.

What is the best method, GetRows or CopyRecordsetFrom?

Thanks
 
Back
Top