I'm trying to export data from SQL Server to Excel with OpenRowSet.
The data does get exported to the Excel sheet datosOtraManera, BUT formulas are not automatically recalculated because Excel doesn't recognize the new data. This problem appears when we have to update from ...OLEDB.12 to OLEDB.15
I tried the following statement:
SET @SQL ='
INSERT INTO
OPENROWSET (''Microsoft.ACE.OLEDB.15.0'',
''Excel 12.0;Database='+ @TmpXLSX +''',
''SELECT * FROM [datosOtraManera$]'')
SELECT getdate() '
EXEC sp_executesql @SQL