We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel calculate with GETPIVOTDATA when referenced file is not available

I am using the following simplified code to calculate Excel:

var dataDir = @"c:\temp\";

// Creating a file stream containing the Excel file to be opened
using (var fstream = new FileStream(dataDir + "pivot_test.xlsx", FileMode.Open))
{
	// Instantiate a Workbook object that represents the existing Excel file
	var workbook = new Workbook(fstream);

	workbook.CalculateFormula();
	
	workbook.Save(dataDir + "xxx.xlsx");
}

I have a cell, that uses the data from an external Excel using the following code (the file is stored at sharepoint):
=GETPIVOTDATA(“Sales”,‘https://some_url.com/[Sample - Superstore.xlsx]Sheet1’!B16)

The issue is when I open the Excel on a computer that does NOT have access to the specific sharepoint file - the value becomes #REF. In Excel, it does not happen.

I am attaching the sample and the data Excels.
pivot_test.zip (8.7 KB)
Sample - Superstore.zip (2.3 MB)

@eyalmolad,
We have observed this issue and logged it in our database for further investigation. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNET-48228 - Calculate with GETPIVOTDATA fails when referenced file is not available