How to create pivot table at the end of the sheet.
How to create the pivot table dynamically at a end of the excel sheets simultanously
You can use the Create Pivot Table activity to create the table.
In the destination property you can pass the cellname
For example if your sheet has 100 rows
and you want this pivot table to be created on 102 row.
Use Last row Property to get the count of rows, LastRowCount
LastRowCount= LastRowCount+3
(add 2 or 3 to it, to place your Pivot Table at correct place)
because you want it to leave one line after your data ends and give
Excel.Sheet(YourSheetName).Range(“A”+LastRowCount.ToString)
Thanks
Happy Automation!
You can find the last data row & by using the create pivot table you can create the pivot table in the same sheet at the end of the excel sheet.
Hope this helps
Add some delay, Is the excle file xls or xlsx?
how to keep if condition like
current sheet a2 cell is empty?
because some of my sheets are empty having headers only
use the below macros and please make sure to change the sheet names and the fields as per your requirement.
PivotTable.txt (1.2 KB)
Regards
the pivots are not created
if data is there then only it will create. share your excel file
sheet1 - Copy.xlsx (1.2 MB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.