I am generating Excel files with Perl using the use Excel::Writer::XLSX module. I put the data on a sheet. I want to automatically as I create the Excel file, also create a pivot table and chart with that data. The pivot table and charts need to have filter, so I can select Month, Week, Status, Department. I have been searching for days with no result on how to do that.
If you know a better suitable option with other programming languages, like python, ruby or java. Please let me know.
Thanks a lot!
Happy Holidays!
To my best knowledge none of the Perl modules supports pivot tables in Excel at the moment nativly.
There is two workaround: Create and setup the pivot (like a template) and the chart by hand then load your data and save a file in different name.
Create a pivot table using OLE, it is working only on windows. Starting point: http://www.perlmonks.org/?node_id=651561
Regards,
Related
I'd like to automate the creation of monthly reports. I have a database through which I can export an Excel file (or csv, for the record). The table format is such that the number of columns (~500) will always be the exact same, but the number of rows (25-100) is variable.
The end goal is an excel tab with a few graphs/charts based on said data. For the charts, I'll only need to use maybe 10 columns of data out of the 500, but all of the rows.
I would like to automate the creation of this report as much as possible. Ideally, it will be able to be used by people with limited Excel knowledge. I would think I could set it up such that they can export the file out of the database, input it into my created sheet, and receive an output of charts.
This seems simple but I can't find much info on something like this. I just want to tell Excel "for every inputted file, make a pie chart out of these columns, a line graph out of these columns, a bar graph out of these...etc etc"
Power Query is where I started, and it helped to clean up the large number of unneeded columns, but I don't see where the functionality to automatically create charts comes into play. Macros/VBA seemed like an obvious next step, but I'm worried about how to set it up such that other users won't have to mess with the macros to get a desired end result. Again, ideally it would be as simple as inputted a file path, clicking a button, and getting graphs outputted.
Any tips or advice on how to approach this or what Excel tools that would be easiest to use would be great. Thank you in advance!
Goal: I am trying to build a dashboard in excel using one pivot-table & multiple charts based on that pivot-table. The pivot-table have to have a access query data link.
Problem: Currently I build a data link for every chart because I cant find a way to build multiple charts of one pivot table. Excels bloats like a balloon when I do this and takes really long to save any changes not to mention refreshing the data...
Is there a better way of doing this?
What do you guys use to build reports in big databases?
Side Note: I realize Access also got pivots but they are limited in features and unstable with lots of data. Also I have seen similar questions on this site but with limited or lacking answers.
Found an answer here: https://www.youtube.com/watch?v=_nfJLz5rVmo
Basically when working with external data you should link "un-pivoted" data then create 2 pivot tables based on that data in a new excel sheet. Then on those 2 new pivot tables you can then build 2 charts which are linked but can have different layouts!
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.
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.
I have a series of table in Excel worksheets, all of them holds same data types, one table for one item, and how some values changed over time in each table column.
I want to create a excel graph/chart for each of this table, with same formatting, only the data should be different.
When I copy each from single graph to create many, the table link doesn't change and I have to do that manually, which is difficult because there are number of tables.
Is there any better solution? Thank you
The dirtiest solution is to simply use VBA to automate these changes.
I finally copied and pasted the same graphs for each table, undo the old links and linked each table separately. I was looking for a easier way than this because even this is difficult with number of tables increasing. Thank you.