1
votes

I am using Excel Services in Sharepoint 2010 to inject some data into an Excel xlsm file. This is working fine.

I know that macros will not run on the Sharepoint server, but I want users to be able to download the full workbook after the data injection and have the macros enabled in the full workbook. But, it seems that when Excel Services injects the data, the workbook is always saved with the macros stripped out of the file. Is there any way around this?

1

1 Answers

0
votes

How does Excel Services "inject" data? Consider using a data connection in the Excel file instead.

To do that, create a view that shows the data you want and export to Excel. The file now has a data connection to the SharePoint list. You can configure the connection settings and use the data in the spreadsheet. You can hide the sheet with the SharePoint data if it messes up the workbook look.

Or, use the file "injected" with Excel Services as a source file and create a separate file that runs the VBA. Open the injected file and read its data with VBA.