> >
> > Copy to ... type xl5
> >
> > wouldn't be affected. It creates an old version format which Excel 2007 recognizes.
> >
> > Your automation for decoration is unlikely to be affected any way. But there a question comes to mind. If you're using automation for decoration, why not use it for 'copy...' part too:) Then your document would be saved in Excel2007 format (currently I think you either suppress the prompts with DisplayAlerts=.f. or SaveAs).
> >
> > Cetin Basoz
> Cetin,
>
> Thanks, but no thanks. Everyone here is still running Office 2003.
>
> Pat
I'd recommend that you use automation and Excel's QueryTables function to read any type of DBF by way of VFPOLEDB:
Here'a and example turning the Orders.DBF in the Northwind.dbc into a spreadsheet you can then save as whatever XLS or XLSX format your customers support.
LOCAL oExcel AS Excel.APPLICATION
LOCAL oBook AS Excel.Workbook
LOCAL oSheet AS OBJECT
oExcel = CREATEOBJECT("Excel.Application")
oBook = oExcel.Workbooks.ADD
oSheet = oBook.Worksheets(1)
* 'Create the QueryTable object.
LOCAL oQryTable AS OBJECT, sNorthwind AS STRING
sNorthwind = HOME(2) +;
[NORTHWIND\NORTHWIND.DBC]
oQryTable = oSheet.QueryTables.ADD ;
("OLEDB;Provider=VFPOLEDB.1;Data Source="+sNorthwind+";", ;
oSheet.RANGE("A1"),"Select * from Orders")
oQryTable.RefreshStyle = 2 && xlInsertEntireRows = 2
oQryTable.REFRESH(.F.)
oExcel.VISIBLE=.T.
-Anders