Started with importing SAS data into Excel spreadsheet in the format of Pivot Table. Then set up with all the fields in that pivot table (e.g. filters, rows, columns etc.).
The question is how to create more pivot tables with the same structure/fields but different data source?
On the SAS ribbon in Excel, click Tools -> Replicate SAS Content to copy the SAS-sourced PivotTable. Then highlight the replicated SAS Content and choose "Change Data Source".
Never copy and paste a PivotTable from one location to another in a workbook if you want to retain the SAS links to refresh the data. See http://support.sas.com/kb/44932.
And this is why you never use GUI tools.....
You would be better off asking on an Excel forum about Excel matters, this is a SAS forum. If it was me, I would record a VBA macro, then modify that VBA macro to generate the required outcomes.
And if it was me, I'd implement the whole logic in SAS and stay lightyears away from Excel.
SAS code can be versioned, logs can be kept for reference, the code can be made flexible by using macro features, and everything can easily be run by the organization's scheduling system.
Which version are you using?
I am able to change data source:
"Ändra datakälla" means "change data source" 🙂
I am using excel version 14.0.6023.1000 and add-in 7.12 (7.100.2.3662)
//Fredrik
On the SAS ribbon in Excel, click Tools -> Replicate SAS Content to copy the SAS-sourced PivotTable. Then highlight the replicated SAS Content and choose "Change Data Source".
Never copy and paste a PivotTable from one location to another in a workbook if you want to retain the SAS links to refresh the data. See http://support.sas.com/kb/44932.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!