Mashup Provider: revisited

Started by stanl, July 09, 2023, 05:00:04 AM

Previous topic - Next topic

stanl

Having previously posted code for using Mashup.Oledb.1 Provider for Power Query [circa 2021] I am trying to update several scripts for users written over a decade ago for Office 32-bit [users have upgraded to either Office 2016 or 365]

       
  • Tried OLEDB enumerations in both WB and Powershell, but even if installed, Mashup does not show up on returned data.
  • When running scripts that transform data [.csv, .html, .json] into an .xlsx file, often cannot delete source data - getting error that file is in use - process is Microsoft.Mashup.Container.Loader.exe
It appears that if Office 64 is running [previous post for that] one can assume that Mashup Oledb is registered even if it doesn't show up on Provider list. I have seen posts that suggest using taskkill for Microsoft.Mashup.Container.Loader.exe [vba code] but would rather not have to shell out to run it. Looks like adding the Process Extender and using tlistProc() and tkillProc() are the ticket, but is there a simpler way?

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Quote from: td on July 09, 2023, 07:55:28 AM
Perhaps:

https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/WILLZ_T__021.htm


Maybe.. That seems to refer to a window; my understanding is Mashup loader runs as a process and the error is quirky... so I guess I need a script like



       
  • Open source and create Power Query mCode to Process it
  • Save the transformed .xlsx file
  • Close all Excel objects ws => wk => xl  [in that order]
  • check if Mashup Loader is still active as a process and close
  • delete source data
Hate it! Users get all jazzed about Power Query / Power BI and question why you cant't make it happen as it looks soooo easy :o

td

If I recall correctly, TerminateApp accepts an application name which is usually the file name of the executable. Just need to put a 3 in the second parameter.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Quote from: td on July 09, 2023, 05:58:06 PM
If I recall correctly, TerminateApp accepts an application name which is usually the file name of the executable. Just need to put a 3 in the second parameter.


Will test. It won't matter if it returns True or False, unless False might indicate the process is active but cannot be terminated. In all my previous tests there was never a problem with deleting source after Power Query concluded...