0

I am automating excel reports on a server where ms office is not installed. I have used EPPlus library which is working fine for import/export in excel. But I am not able to refresh pivot table data with different connection strings in asp.net. I have also tried with PSExcel. But could not find a solution.

Is there any way to refresh pivot data using different connection strings on a server where ms office is not installed. Need code snippet in asp.net c#.

Note : sharepoint (power pivot) is not a recommended solution for this issue.

  • 1
    You can't update the Excel pivot tables without Excel. You can write and export them using an export API, but Excel or another program that can render Excel pivot tables has to be used to execute that functionality. One option I have seen is to export to a template that has a macro that updates the pivot tables on open, but that's as close as you're going to get. – maniak1982 Feb 22 '17 at 14:35
  • @maniak1982, will it a good solution of creating a pivot table every time in place of refreshing it ? – Ushma Mulwani Mar 02 '17 at 11:42
  • It depends on what exactly you are doing. If you're hoping to export a spreadsheet with a pivot table that is up to date when it opens, that's definitely do-able. If you want to use fresh pivot table data on the server side without using Excel, you're going to be out of luck. – maniak1982 Mar 03 '17 at 16:15
  • @maniak1982 my requirement is pivot in spreadsheet should get refreshed on a particular time in a month with database data which changes every month. So is it achievable without creating instance of excel.exe ? – Ushma Mulwani Mar 04 '17 at 18:02
  • You can't update the pivot table outside of Excel. Your best answer is to refresh the pivot table data automatically when the file is opened, which you do in a VBA macro, as shown here: http://www.get-digital-help.com/2011/06/13/auto-refresh-a-pivot-table-in-excel/ – maniak1982 Mar 04 '17 at 18:04

0 Answers0