Question : Access 2007 export to Excel 2007 not working

I have a weird issue going on. I have an Access 2007 database and an XLS with multiple tabs. As of now, i use the acspreadsheettypeexcel9 command to export data from Access to the XLS putting specific tables of data into specific tabs. This works perfectly. However i would like to do the same thing but going to an XLSX. So i tried using acspreadsheettypeexcel12 and acspreadsheettypeexcel12Xml but when i run it no data gets transferred to the XLSX. Can anyone think of a reason why this might not work?

Below is a sample of one of my export lines. the sFn variable prompts the user to choose the XLSX.
Code Snippet:
1:
2:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "FC_Count of File Creations by Day", sFn, True, "2A_FileCreationbyDay!A1:B1"
 DoEvents

Answer : Access 2007 export to Excel 2007 not working

place the codes in a regular module..

to use the codes,
from where you are calling your codes use this

       Call exportXLSX("full path to the excel file", "the name of the table","the name of the sheet")

      using the code below as an example
 DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "IH_IE History by URL Host", sFn, True, "5B_IEHist_Count"
     
       this will be translated like this

            Call exportXLSX(sFn(), "IH_IE History by URL Host","5B_IEHist_Count")







     
Random Solutions  
 
programming4us programming4us