Hi,
I am trying to run a query, and export the data to an existing spreadsheet. I would like to replace the existing data in the spreadsheet with the new export. The reason being, there are other sheets which never change.
Is this possible with Docmd.TransferSpreadsheet?
I used this statement:
DoCmd.TransferSpreadsheet acExport, , strQryName, strPath & strFileName & ".xlsx!SourceData"
This gives an error saying the file is read only.
Right now, I am opening the spreadsheet, clearing the contents of Sheet: SourceData, replacing it with Query results.
I would like to know if there is an easier option.
Thanks!
I am trying to run a query, and export the data to an existing spreadsheet. I would like to replace the existing data in the spreadsheet with the new export. The reason being, there are other sheets which never change.
Is this possible with Docmd.TransferSpreadsheet?
I used this statement:
DoCmd.TransferSpreadsheet acExport, , strQryName, strPath & strFileName & ".xlsx!SourceData"
This gives an error saying the file is read only.
Right now, I am opening the spreadsheet, clearing the contents of Sheet: SourceData, replacing it with Query results.
I would like to know if there is an easier option.
Thanks!