cancel
Showing results for 
Search instead for 
Did you mean: 

MS Excel VBO - Extended Amend Pivot Table Data Sourceについて

ShotaHomma
Level 3
MS Excel VBO - Extended Amend Pivot Table Data Sourceで、
添付資料のようにパラメータやExcelデータを入れても動作しません。
35074.png
もし、動作させた方がいらっしゃいましたら、
パラメータや、前提条件等、教えていただけないでしょうか?
5 REPLIES 5

Hi

The code in this I found didn't work correctly and I had to change it. The code I used for this is below and works well so should work for you. Let me know if everything worked for you.

Inputs - Handle, Workbook, Worksheet, Range, PivotTableName, DataWorksheet
================================================================
Dim wb, ws, wd As Object
Dim excel, sheet As Object
Dim rng As String

wb = GetWorkbook(Handle, Workbook)
wd = wb.Worksheets(DataWorksheet)
ws = GetWorksheet(Handle, Workbook, Worksheet)

wb.Activate()
ws.Activate()

excel = wb.Application
sheet = excel.ActiveSheet

rng = sheet.Range(Range).Address(ReferenceStyle:=-4150)
rng = wd.Name & "!" & rng


ws.Activate()
sheet = excel.ActiveSheet
sheet.PivotTables(PivotTableName).SourceData = rng
sheet.PivotTables(PivotTableName).RefreshTable

ewilson
Staff
Staff
@Michael ONeil,

Thank you for your contribution to the Community. 😉 We'll get your fix added to the Extended VBO on the DX.

Cheers,
Eric​

ewilson
Staff
Staff
FYI - The VBO has been updated on the DX. The latest version is v2.3.

https://digitalexchange.blueprism.com/dx/entry/9648/solution/ms-excel-vbo---extended

Cheers,
Eric

Great news @ewilson thank you :)​

ShotaHomma
Level 3
@Michael ONeil
@ewilson

Thank you for your quick response.

The good news is that the latest version has been released.


I'll give try it.​​