Hello:
SO My case is the following.
I have 1 sheet with raw data that uses smart markers. My pivot table is in another sheet and it has a reference to it, so the smarts markers are the same.
For pivot table, when processing is changing the smart markers names and appending a 2, to make them different than my reference data that also has the same smart markers.
For example, “&=Data.sup_name”, I have this one in the pivot table and in the raw data. after process the file template with data, I open the template and this will be changed to “&=Data.sup_name2” and of course, I won’t have this column in my dataset and it will be shown as blank.
I’ve tried many times and is always changing the template as I said and that could be the reason why I don’t get data in pivot table.
This was working as I said in version 18.4. Current version 20.9
If you try to change any name in the sample template(pivot table) after has been processed to remove the appended “2”, excel will crash, so you need to press ESC key to undo the change, otherwise you won’t be able to close the file.
under the folder bin/Debug/net6.0 are the templates and the files generated when running the program.
You will notice also that I put 2 smart markers outside the pivot table and work perfectly.
See the picture, that is the status of my smart markers in the sheet after processes the data into the template. Names are changed as I described before.
Notice those outside the pivot table, werent’ touched.
Other picture is that you can see both smart markers in both sheets how they are originally
smart markers in pivot table and another sheet as reference.png (117.3 KB)
Clearly is an issue related to pivot table and reference data using the same smart markers name. This was working before
“template_sample_original.xls” is the template how it should be. I would recommend creating copies and changing the code to test. You will see that after the process, smart markers change in the template.
changed smart markers.JPG (125.2 KB)
Attaching my sample project
ConsoleApp1.zip (7.4 MB)
Thanks for your help.