Yes I am usinig DoCmd to import the excel files into tables and to export query results into excel.
The table structure for import is not predefined.
DoCmd.TransferSpreadsheet (acImport), acSpreadsheetTypeExcel12Xml, outsname(i) + "Output", outfadd, True, outsname(i) + "$"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, strEngagementSheet, strPathFile
Also tried the following-
1. I did try creating a table structure and reading cell by cell from excel into the table, however, the recordset that read from teh excel cell (for the memo field) - displayed unidentified characters post 255th position.
2. I also tried to export the data into XML first and then importing XML file into Excel.
I have windows 7 installed and Access 2007 crashes when the XML is saved. I noticed that the XML file was getting saved but it was not well formed. The same code worked on a colleagues machine though. So I do not know what is missing in my machine.
Code for saving XML-
Dim objOrderInfo As AdditionalData
Dim objOrderDetailsInfo As AdditionalData
Set objOrderInfo = Application.CreateAdditionalData
Set objOrderDetailsInfo = objOrderInfo.Add("EngagementsDifference")
Application.ExportXML ObjectType:=acExportQuery, DataSource:="EngagementsDifference", _
Code for importing XML into EXCEL
ActiveWorkbook.XmlImport URL:= _
ActiveWorkbook.Path + "\EngagementsDifference.xml", ImportMap:= _
Nothing, Overwrite:=True, Destination:=Range("$A$1")