New Post: Excel 2013 32 bit freezes when trying to refresh BI queries
New Post: Excel 2013 32 bit freezes when trying to refresh BI queries
New Post: Excel 2013 32 bit freezes when trying to refresh BI queries
What do you mean by BI queries exactly? PivotTables? What is the data source? Are you using Power Pivot? What's the query? How do you think this relates to my add-in?
New Post: Enable/Disable AutoRefresh via Macro
Did you ever hear back from TheRizza? I'm not familiar with C# so would struggle to translate the relevant piece of code into VBA but it would really save me a lot of time to have a macro to disable the automatic updating of pivottables... and I'm struggling to obtain approval to install your plug-in at work.
Thanks!
Esther
Created Unassigned: Posting VBA version here [63563]
I use this in Excel 2013. I could not get the "ActiveWorkbook.Connections.Add2" code to work reliably and haven't had time to debug it further. In the current state, I believe the only impact is that if you add a new column to a table while the refresh is off, it might not show up until you find a manual way to trigger the right refresh. You will not get any error messages when executing the code, but the "Debug.Print" statement will log the error to the Immediate Window.
We implemented this in an Add-in and with a button on the ribbon.
```
Option Explicit
Private Const TEMP_MODEL_FLAT_FILE_CONNECTION_NAME As String = "OLAP PivotTable Extensions Temp Connection"
Sub ToggleAutoRefresh()
'Ported to VBA
'From v0.84 at <https://olappivottableextend.svn.codeplex.com/svn/OlapPivotTableExtensions/Connect.cs>
Dim bEnableRefresh As Boolean 'current state of refresh
Dim connTemp As WorkbookConnection 'dummy connection used to drive a refresh
Dim sTempDir As String 'temp directory eg. C:\Users\username\AppData\Local\Temp\
Dim sFile As String 'path and filename where we will store conn info
Dim i As Integer 'loop counter
Dim OriginalCalculationMode As Variant
On Error Resume Next
bEnableRefresh = ActiveWorkbook.PivotCaches(1).EnableRefresh
If Err Then
Select Case Err.Number
Case 9:
MsgBox "No PivotTables found.", vbCritical, "Error: " & Err.Number & " " & Err.Description
Case 91:
MsgBox "Active Workbook not found.", vbCritical, "Error: " & Err.Number & " " & Err.Description
Case Else
MsgBox Err.Description, vbCritical, "Error: " & Err.Number
End Select
Exit Sub
End If
On Error GoTo 0
If bEnableRefresh Then
Application.StatusBar = "Setting PowerPivot refresh off..."
Else
Application.StatusBar = "Setting PowerPivot refresh on..."
End If
Set connTemp = Nothing
If Not bEnableRefresh Then 'let's start refreshing
'if we are about to re-enable refresh, make a quick model change (adding a simple flat file connection
'which we will delete in a second... deleting it will cause the pivots to refresh)
sTempDir = Environ$("Temp") & "\"
sFile = sTempDir & TEMP_MODEL_FLAT_FILE_CONNECTION_NAME & ".txt"
Open sFile For Output As #1
Print #1, "col1" & vbCrLf & "1" 'just some sample contents to load
Close #1
For i = 1 To Application.ActiveWorkbook.Connections.Count
If Application.ActiveWorkbook.Connections(i).Name = TEMP_MODEL_FLAT_FILE_CONNECTION_NAME Then
Set connTemp = Application.ActiveWorkbook.Connections(i)
Exit For
End If
Next i
If connTemp Is Nothing Then
'Any suggestions on how to fix this connection string? I can't get it working reliably...
On Error Resume Next
connTemp = ActiveWorkbook.Connections.Add2( _
Name:=TEMP_MODEL_FLAT_FILE_CONNECTION_NAME, _
Description:="This is a temporary connection used by OLAP PivotTable Extensions to trigger a quick refresh of " & _
"the PivotTable field list. Feel free to delete.", _
ConnectionString:="OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & sTempDir & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"";", _
CommandText:="OLAP PivotTable Extensions Temp Connection.txt", _
lCmdType:=Excel.XlCmdType.xlCmdTable, _
CreateModelConnection:=True, _
ImportRelationships:=False)
If Err Then Debug.Print Err.Number & ":" & Err.Description
On Error GoTo 0
End If
End If
'enable/disable PivotCaches
For i = 1 To Application.ActiveWorkbook.PivotCaches.Count
If PivotCacheIsDataModel(Application.ActiveWorkbook.PivotCaches(i)) Then
If bEnableRefresh Then
Application.ActiveWorkbook.PivotCaches(i).EnableRefresh = False
Else
Application.ActiveWorkbook.PivotCaches(i).EnableRefresh = True
End If
End If
Next i
'enable/disable DAX query tables
For i = 1 To Application.ActiveWorkbook.Connections.Count
If Application.ActiveWorkbook.Connections(i).Type = xlConnectionTypeMODEL Then
On Error Resume Next
'this statement will fail for the ThisWorkbookDataModel connection
'but will succeed for DAX query tables...
'if we want to avoid this error in the future, we may have to check
'whether ModelConnection.CommandType = xlCmdCube
'(which means it's ThisWorkbookDataModel) or
'ModelConnection.CommandType = xlCmdDAX (or maybe xlCmdTable, too?)
'which means it's a DAX query table
Application.ActiveWorkbook.Connections(i).OLEDBConnection.EnableRefresh = Not bEnableRefresh
On Error GoTo 0
End If
Next i
'set the calculation mode to manual when disabling auto refresh so that CUBEVALUE formulas don't refresh
If bEnableRefresh Then
'save the current calculation mode before setting it to manual
OriginalCalculationMode = Application.Calculation
End If
If Not bEnableRefresh Then
Application.Calculation = xlCalculationAutomatic
'delete the temporary flat file connection to trigger a refresh of the
'field list in the PivotTables without refreshing the SQL data sources
On Error Resume Next
connTemp.Delete
On Error GoTo 0
ActiveWorkbook.Model.Refresh
Else
Application.Calculation = xlCalculationManual
End If
If bEnableRefresh Then
Application.StatusBar = ActiveWorkbook.Name & " PowerPivot Refresh = OFF"
Else
Application.StatusBar = ActiveWorkbook.Name & " PowerPivot Refresh = ON"
End If
End Sub
Function PivotCacheIsDataModel(pc As PivotCache) As Boolean
PivotCacheIsDataModel = pc.OLAP And _
pc.WorkbookConnection.Type = xlConnectionTypeMODEL
'pc.WorkbookConnection <> Nothing And
End Function
```
New Post: Enable/Disable AutoRefresh via Macro
Created Unassigned: OLAP Pivot Table Menu is not appearing [63711]
I just installed the extension on a 2007 version of Excel.
The ddd-in is now appearing in the "Excel Options > Add-Ins" but when I right-click on a pivot table to see the "OLAP Pivot Table...", there is nothing there.
Do I need to active something to see it ?
Thanks in advance
Commented Unassigned: OLAP Pivot Table Menu is not appearing [63711]
I just installed the extension on a 2007 version of Excel.
The add-in is now appearing in the "Excel Options > Add-Ins" but when I right-click on a pivot table to see the "OLAP Pivot Table...", there is nothing there.
Do I need to active something to see it ?
Thanks in advance
Comments: ** Comment from web user: furmangg **
What's the source of the PivotTable? SSAS? Power Pivot?
If you click on the PivotTable then press Alt-F11 then Ctrl-G then paste the following into the Immediate window and press enter:
?ActiveCell.PivotTable.PivotCache().OLAP
Does it say True?
If not, then you PivotTable is a native PivotTable that's summarizing some table or other data in the spreadsheet or SQL table. You have to have an OLAP PivotTable (that is, one connected to an Analysis Services server or Power Pivot) for my add-in to work.
New Post: Excel 2016 Compatibility
After upgrading to 2016 it no longer works properly. I have tried updating a data model with the AutoRefresh disabled, but I receive an error message when I try to re-Enable.
Just looking to determine if I will be able to continue using this solution.
Thanks
New Post: Excel 2016 Compatibility
New Post: Excel 2016 Compatibility
https://olappivottableextend.codeplex.com/wikipage?title=Disable%20Auto%20Refresh&referringTitle=Home
Do you still find it useful? Only for the most complex workbooks?
New Post: Excel 2016 Compatibility
New Post: Enable/Disable AutoRefresh via Macro
Can you please share me the VBA code or the reference link to Issues tab.
Its mentioned in previous thread its mentioned enhancements coming in the next release (probably sometime in July) which enhances disabling refresh on CubeValue formulas and on DAX query tables. Please share me the details too
Thanks,
Farha
Commented Issue: Feature Request - Filtering List [14196]
Our business would like to have the feature to be opposite of the filter list, they want to say keep everything but what is in the list (not sure if MDX likes this type of thing). Also, would it be possible to populate the list with what was entered prior if you did filter. You can look at the MDX and see the items, but the users would like to just see their simple list again.
Comments: ** Comment from web user: Cathymadsen **
+1 vote
First of all, yes, I would also like to have an "exclusion list" feature.
However, my concern is that once you select anything using the filter list, there is no way to remove the selection, you can't remove it using Olap Pivot Table Extensions or via the pivot table itself.
Commented Issue: Feature Request - Filtering List [14196]
Our business would like to have the feature to be opposite of the filter list, they want to say keep everything but what is in the list (not sure if MDX likes this type of thing). Also, would it be possible to populate the list with what was entered prior if you did filter. You can look at the MDX and see the items, but the users would like to just see their simple list again.
Comments: ** Comment from web user: furmangg **
Cathy, good point on my add-in needing a UI to clear the filter.
You can't clear the filter with Excel UI? Can you provide steps to reproduce?
New Post: big difference in the speed of calculation of a calculated field
SUM(MTD(StrToMember ('[Kalendar].[Kalendar].[Data_Sales].&['+format( DateAdd("yyyy", -1, now()), "yyyy-MM-dd" )+'T00:00:00]') ),[Measures].[Sales])
SUM(MTD(StrToMember ('[Kalendar].[Kalendar].[Data_Sales].&[2014-08-26T00:00:00]') ),[Measures].[Sales])
New Post: big difference in the speed of calculation of a calculated field
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices
http://stackoverflow.com/unanswered/tagged/ssas
New Post: big difference in the speed of calculation of a calculated field
New Post: Incompatibility with Capital IQ Plugin
When OLAP PivotTable Extensions is installed in conjunction with the Capital IQ plugin I receive the below error:
Problem during startup of OLAP PIvotTable Extensions:
Invalid Index. (Exception from HRESULT:0x8002000B (DISP_E_BADINDEX)) at Microsoft.Office.Core.CommandBarControls.Add(Object Type, Object id, Object Parameter, Object Before, Object Temporary) at OlapPivotTableExensions.Connect.CreateOlapPivotTableExtentionsMenu()
Environment:
• Windows 8
• Excel 2013 64 bit (15.0.4745.1000)
• CapitalIQ_OfficeBootstrap9-0-8920-5968.exe
• OLAP PivotTable Extensions Setup for 64-bit Excel (v0.8.4).exe
Thanks,
Simon
New Post: Refreshing causes me to lose Calculated Members
This is my first post here & I have been using OLAP PivotTable Extension for a while now & I have find it very useful.
I have been experiencing an issue when using Calculated Members in OLAP PivotTable Extension.
I setup my pivot table
I create my Calculate Member which is just a sum of three options I have in the Columns.
I filter my Columns in the pivot table to only show my new Calculate Member
Brilliant this is what I wanted! The pivot table is setup correctly.
The problem occurs when I want to refresh the pivot table. Once it's finished refreshing the pivot table is empty although all the elements I placed in the Rows, Columns, Filter etc. are still there. When I select the filter for the Columns I see my Calculated Member but it's greyed out (although its selected) When I select any one of the options in the Columns it populates the pivot table & shows my Calculated Member too. The thing is I don't want to show any other options I just want to show the Calculated Member I have. What could be causing this to happen? I have many different thing to get around but have failed. Could someone help please.
I am using Excel 2013 32bit with OLAP PivotTable Extension v0.8.4
Thanks