test.zip (14.9 KB)
I get an error saying "Unable to cast object of type ‘System.String’ to type ‘System.Double’ with the attached Excel file and just 3 lines of code to open the file and call RefreshPivotTables() using Apose.Cells 20.4.0
var wb = new Aspose.Cells.Workbook(@"C:\Users\Joshua\Downloads\test.xlsx"); var sheet = wb.Worksheets["pivot sheet"]; sheet.RefreshPivotTables();
image.png (34.4 KB)
While it might be possible to get rid of the error by changing the formulas in my workbook, I don’t have the option to modify the formulas in my application’s scenario since they are created by other users, not me. Refreshing the pivot table manually from within Excel works correctly, but not with Aspose.Cells.
Thank you very much,