Author Topic: Test Script for Mcode  (Read 116 times)


  • Pundit
  • *****
  • Posts: 1463
Test Script for Mcode
« on: April 09, 2021, 01:56:48 pm »
The attached zip contains
  • an Excel file with a Power Query connection to the Sunrise-Sunset url Jim Taylor noted in that thread
  • a text file of the Mcode for the query with a replacement section
  • a .wbt script that loads the file and has 2 udfs
The udf chkit() - merely runs code to output the query name, connection name, connection string

The udf changeit() - should update the Month of the query from May to August (but you can change the month you want to see.

I'm intrigued that Mcode { not sure, but think the name comes from the 'mashup' OLEDB Provider Power Query uses ] can be used as a simple text file.

I would appeciate it if someone would download and try the script just to confirm that it doesn't just work for me. My next step would be to create an Mcode template and create Power Query from a blank workbook. 


  • Full Member
  • ***
  • Posts: 100
Re: Test Script for Mcode
« Reply #1 on: April 09, 2021, 03:48:49 pm »
Took about 10 seconds to completely execute (from the .zip file), but it works as advertised!