【发布时间】:2021-04-30 06:45:21
【问题描述】:
我有这个问题我正在尝试更新 PowerQuery 中的连接(源)。 你能帮我在VBA中怎么做吗??
我的 DebugPrint(抱歉,我有一个波兰语版本的 excel365;)):
TEST_CHANGE let
Źródło = Excel.Workbook(File.Contents("C:\Users\revol\Desktop\PQ_11.xlsm"), null, true),
TEST_CHANGE_Sheet = Źródło{[Item="TEST_CHANGE",Kind="Sheet"]}[Data],
#"Nagłówki o podwyższonym poziomie" = Table.PromoteHeaders(TEST_CHANGE_Sheet, [PromoteAllScalars=true]),
#"Zmieniono typ" = Table.TransformColumnTypes(#"Nagłówki o podwyższonym poziomie",{{"Column1", type text}, {"Column2", type text}, {Column3", Int64.Type}, {"Column4", type text}, {"Fiscal year / period", type text}, {"Some else", type number}}) in
#"Zmieniono typ"
-----------------------;
我尝试使用此指令,但它不起作用; (
ActiveWorkbook.Queries.Item("MyQuery").Formula = "[Excel.Workbook(File.Contents("C:\Users\revol\Desktop\change_source.xlsm"), null, true)]"
提前感谢您的帮助
【问题讨论】:
标签: excel vba powerquery