Pivot table refresh throws error "Cannot open the source table" whn
the Excel sheet is downloaded from the web.
This error is shown because Pivot table is pointing to some temp
folder for the data source instead of the excel sheet.
i have manipulated the string in the code to hard code the
datasource. but i dont know how to get the cells of a particular
range.
Can anyone please help me in this regard,
PvtSource = Worksheets("A").Range("G").PivotTable.SourceData
//here PvtSource is pointing to temp folder of the system
PvtSource = "A!R10C3:R300C5"
//i hv hard coded the source data
Worksheets("A").Range("G").PivotTable.SourceData = PvtSource
// this works fine but i dont want to hardcode the value. i want
atleast to get the values form the range object
(Worksheets("A").Range("G"). ? )
or if someone knows any other way to fix this error tht would be of
gr8 help.