Can you try either of the following?
1. Using the REST API, query view data
2. Bring up the report URL and append .csv onto the end of it and see if this downloads what you want. If so, maybe you can do this programmatically.
We're aware of appending csv to the end of the URL, unfortunately csv isn't an acceptable business solution for us, so if we used the CSV url, we'd then have to run it thru an XLS converter anyways. That's our final option if we can't figure anything else out.
It looks like the REST API will also return the underlying data, not the pivot grid?
Were you able to figure anything out on this? We need the same thing!
We're still trying to find a work around. We've been playing with:
GitHub - starschema/starschema-tableau-excel-extractor: Extract Tableau reports in Excel format.
That apparently used to work for custom views (and only custom views), but it appears to be broken as of the newest version of tableau server.
But even if we get there, it doesn't take parameters or the current state of the view into question, just the custom view as saved on the server.
For a little more background, it appears if you run fiddler or wireshark, or some other tool to track webtraffic, you can see the vizql query chain that results in generating a crosstab when you do so manually, so we're basically using those, and the existing code in that github repository to try and see if we can automate that vizql call.
This doesn't help your use case, but I am working on a POC to schedule reports to XLSX, and the only method I've found thus far is to use Selenium IDE to generate a .SIDE and then calling the .SIDE with selenium-side-runner. I'm still working on some challenges with the process, not the least of which is the requirement to have a .SIDE per report.. I've yet to determine a way to inject a variable into the .SIDE so I could just create a single .SIDE to handle the navigation and download actions.
Assuming I resolve this, I'm then using Powershell to add a title and some header rows, apply some formatting and save to XLSX.
Just to confirm I get your use case; you are looking for a way for your dashboard viewers to be able to export to Excel a crosstab of data that is based on what they see in a crosstab you have on your dashboard and not just the raw summary data. If that's true then this is something you could develop using the Extensions API! We currently do not have a specific method for getting/exporting crosstab data (as it seems you've found) but you could get the summary data, form it into a crosstab and export it to Excel yourself. Just to give you an idea on what the final product could look like, take a look at the Export All extension in the Gallery (source code). I don't think this is exactly what you are looking for as it just returns the raw data but hopefully you can see how you could implement something similar with crosstab data. Hope this helps!