Generating an Excel spreadsheet with a Pivot Table over a large embedded data source? - excel

I have a large amount of data that is possibly more than a million rows. I want to be able to offer users the ability to download an Excel spreadsheet with a Pivot Table over this data, disconnected from any database.
Is it possible to have the data source that the pivot table works over embedded in a spreadsheet?

The answer to your direct question is YES, data can be embedded in a PivotTable. Yet since you specify "more than a million rows" and "disconnected from any database", the answer to the implied application is NO. You aren't going to get more than one million rows in an Excel spreadsheet. And I would venture to say that one million rows don't belong in a spreadsheet.
I think one of the purposes of a PivotTable is to allow you to summarize data from an external source. If you can (or think you can) combine data with a PivotTable and download the entire mess, why not do the summary yourself, and download just the summary data? it would be interesting to hear more about the actual application.

If you create a pivot table from an external data source, then email it to someone, they can see and interact with your pivot table. They can't refresh unless they have access to the original data. But that seems to be almost what you're asking.
Excel creates a PivotCache that is embedded in the workbook. That's why the aforementioned emailed spreadsheet can be seen by people without the source data. The PivotCache doesn't necessarily hold the source data in its entirety and it's not directly accessible (as far as I know).
I'm not sure if that answers your question. It seems like what you're after is what PivotTables do normally.

A tool that should be mentioned more when trying to work with more than a million rows in Excel is:
* PowerPivot for Microsoft Excel 2010
or www.powerpivot.com by Microsoft.

Related

Extracting data dynamically from master table to tables on dashboard

I have spent the last 3-4 days trying out all kind of tips and tricks found on YouTube and rest of the internet. But I don’t manage to create what I want. Now I have to swallow my pride and ask for help.
I have a big master table, or database, with all kind of information. I want to create a dashboard with a few smaller tables with just some of the information from the database.
I attached picture of a very simplified version of what I want to archive. Picture of simplified Daschboard/MDatabase:
I want to show some of the cars in column C (in the database) in separate tables on the dashboard with just some of the columns from the master table. When a row is added, deleted or information is changed in the database I want the dashboard table to update. It would be neat if it updated automatically, but a refresh button would do.
I use Outlook 2010 but can’t use MS Query or PowerQuery.
Pivot Tables will do exactly what you want.
Select your data source Sheet2!B3:F13 and click Insert > Pivot Table. Choose the range where you want to put the picot table, and click OK.
The Pivot Table field list will appear - drag Owner, Colour and Condition to ROWS, drag Car to FILTERS. In the Pivot Table > Design ribbon, switch off Subtotals and Grand Totals, and change Report Layout to Tabular Form.
Select a car filter as required, and format to suit.
You can create multiple pivot tables in the same manner. When data in the source table is modified, you can simply refresh the pivot tables to update them.
Thanks a lot Olly!
I totally overlooked the possibility to use pivot tables. I was obsessed with using some clever code to solve it. But the use of pivot seems to be the most convenient solution.
By the way. Thanks all you excel gurus (nerds...) out there who share your knowledge in forums like this. Two weeks ago I had no knowledge about VBA, formulas etc. Now I have managed to build a user friendly database with a dynamic dashboard and interactive user forms. Only by reading forums posts and watching You Tube tutorials.

Excel PowerPivot - change data source type

I have an Excel 2016 with 30 graphs based on PowerPivot. PowerPivot fetches the data from another Excel sheet, but I want it to get the data from a SQL server table instead.
How can I change the data source type in PowerPivot? I've tried looking in the Excel xml without any luck. Would be a lot of work re-creating all graphs over again just to switch data source
Thanks
Dennis
One suggestion I would make for the future, if all the users are using 2016 is to use Power Query which comes standard with that version of excel. In the Power Query loading data into Power Pivot scenario, all Power Pivot cares about is the column names. This means that the query can be changed between data source types without causing issues, as long as the same column names are changed.
As an example, I have one file that based on a parameter flag rips data out of a series of excel files on a shared network drive or Share Point. Both of which would be different data sources. The first opening a folder as the data source, then excel files listed within the folder. The other opening a share point list as its data source, then navigating though excel files.

Excel 2010: Automatically combine multiple tables into one dataset

I thought there would be a simple way of doing this, but unfortunately I have not come across one. My company has an Excel workbook with 12 sheets (1 for each month), into which I enter sales data as accounts are written. I reformatted each month's data into tables, thinking that this would provide an easy reference to gather the data into a pivot table that joins all the months and would be updated as I enter data; however, a pivot table based on multiple sets of data allows highly limited manipulation.
So what I want to do is create a new table that is automatically populated as I enter data in any of the 12 current tables, to combine them into a master listing. I have tried doing a query, but when I try to set up the data sources, it doesn't recognize my tables. I tried Power Query, but I couldn't get it to update the data as I updated the source. Consolidate also was not a useful feature, as it required all the data to be somehow calculated, and my columns need to simply be copied over, not summed or averaged.
As you can probably tell from my explanations and terminology, I'm no Excel expert. I don't know what VBA even is, let alone know how to use it, but I've seen it mentioned a lot, so I figure at some point in my life I should learn it.
Is there a formula or some other Excel 2010 feature that can automatically copy all of this data onto one running list, and keep it updating as I enter data in the source tables? It would have to run automatically.
I believe your end goal is to have a pivot table which consolidates data from each of the individual 12 sheets/tables and not really to have the intermediate "single running list which is an aggregation of all the 12 sheets".
If so, I suggest to create an Excel Pivot table directly based upon the 'Multiple consolidation ranges'.
To start, create a new spreadsheet and select a cell (say A3) and use the click sequence Alt+D+P, this will bring up the PivotTable and PivotChart Wizard, and proceed further using the third option - 'Mulitple consolidation ranges'.
I will have to refer you to the below site for a detailed step by step instructions on the above: http://www.contextures.com/xlPivot08.html
Please be aware that the Difficulty level for this solution is Medium, suggest you to bookmark the solution from maintainability reasons, in case you choose to implement it.

Pivot table in Excel

after googling my specific inquiry online, I haven't found much luck. Basically what I'm trying to do is take a excel file what has lots of columns. Now I'm only interested in some of these columns to be included in a pivot table. Is there a way to automatically create a pivot table, via a script of some sort which will occupy the desired columns in a pivot table that I want to take from the original excel file?
Thank you
The best way to do this for real is to set your file up to make the call to the database and specify that the destination is a pivot table.
How this is done depends greatly on what your data source is. But the functionality to do this is built in to the program without having to use VB at all.

MS Excel - Pivot Table - Accessing the source data when it isn't a tab in the spreadsheet

I have a spreadsheet that is emailed to me by an outside vender. It contains a bunch of pivot tables. I really couldn't care less about the pivot tables, I just want the underlying data. The data comes from a sql server that I don't have access to, but the data is stored within the spreadsheet. Is there anyway that I can access the data, (I think it's the PivotCache) directly without drilling into one of the pivot tables?
I'd love some sort of ODBC/ADO.Net command that I can use from SSIS. But am open to just about anything that doens't require me to open and save the workbook.
I'd also like to avoid macros if at all possible.
Here's the answer. Or at least what I did to resolve my problem.
There is really no way to accss the underlying PivotCache data except via pivot tables. So direct accss was out. I ended up using a script task with excel ole to dynamically create a pivot table with the data I needed at run time. Once the script task is done, I then use the new pivot table as my dataflow source. Excel can be a little tricky to automate, but it's worth it.

Resources