From Newsgroup: comp.databases.ms-sqlserv
Auntie Jack formulated the question :
I've got an Access runtime on a machine without Office installed.
I want to export data to an xlsx file, but all the builtin methods - TransferSpreadsheet, OutputTo, SQL directed to Excel file, ADODB connection to Excel, table built in Excel - are either dependent on an Excel object, or use a driver that is disabled by Microsoft in the current version.
It seems the only 2 options I have are:
Install Excel, or
Find a DLL that will do the job for me, or
Find some very fancy VBA code.
Well, there are tonnes and tonnes of solutions in C# and .NET out there, but none of them are available to VBA. IronXL, NPIO, SpreadsheetLight, ClosedXML:
they all have DLLs but are not COM enabled as far as I can tell.
Does anybody know of an out-of-the-box solution that I can use in VBA?
(BTW sorry I haven't posted here since 2009 - been busy).
Thanks,
Jack
Third option: Export to a CSV. You can use TransferText to do it.
DoCmd.TransferText acExportDelim, , [QueryName], [OutfileName], True
Excel is pretty accommodating with CSV files, so in most cases this
will come down to a teeny, tiny bit of user training and you are good
to go. On my PC Excel is the Default app for CSV files. I am not sure
if that is some setting I made years ago or is a standard thing with
default Office installations.
--
This email has been checked for viruses by AVG.
https://www.avg.com
--- Synchronet 3.21d-Linux NewsLink 1.2