Tag Archives: VBA

Excel Virtually Global 2021

I am one of the 48 speakers at a 48-hour Excel extravaganza online on Oct 12 and 13. It’s FREE but you are encouraged to make a donation to charity to reflect the value to you of the content you … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Event Tracing is three times faster than OutputDebugString

I use the OutputDebugString API in Windows to send debugging messages without the line limitations of the VBA Immediate Window. This is also useful when tracing the causes of crashes which kill the Excel process. I use TraceSpy to capture … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

VBA Performance Profiler : timing procedure execution

This is an update and replacement for the post on 9th March 2017 titled ‘Free add in to profile VBA speed and coverage’. Updated 8-Jul-2021 with an example profile report. Download XLTEST_VBA_Profiler.xlam. (Updated 22-Jul-2021: Tracing P_.O also sends to OutputDebugString … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Querying Text/CSV files in VBA, method #3: Power Query

The module PowerQueryText.bas contains VBA code to query text/csv/tab delimited files and return tables to worksheets. Continue reading

Posted in Excel/VBA, Power Query | Tagged , , , | 2 Comments

Hello (the rest of the) World – reading data in other languages

Have you ever opened a text file in Excel and found that the characters looked weird or corrupted? The Wikipedia entry for mojibake says ‘In German, Buchstabensalat (“letter salad”) is a common term for this phenomenon, and in Spanish, deformaciĆ³n … Continue reading

Posted in Excel/VBA | Tagged , , , | Leave a comment

Nested JSON to flat data tables

Have you ever had to convert a file of JSON text to Excel tables? Not simple JSON, but one with a collection of dictionaries inside a dictionary inside a collection of dictionary records inside another collection of records inside a … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

VBA Read Unicode file contents in various encodings

To read a text file, you need to be able to handle more character sets than just ANSI. Not just in the contents but also in the file and folder names.The classic article on this is by Joel Spolsky:https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ Here … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

UK HMRC MTD OAuth2 Excel/VBA demo

I’m making available as open source my VBA routines for the “Hello World” tests on the UK HMRC “Making Tax Digital” (MTD) web service which use oAuth2 and JSON. Thanks to posts from Bruce McPherson (Excel Ramblings), Tim Hall (Excel-REST), … Continue reading

Posted in Excel/VBA, Open Source | Tagged , , , , , | 1 Comment

A first look at the FUSE spreadsheet corpus

Following on the first paper by Titus Barik et al static.barik.net/barik/publications/msr2015/PID3640389.pdf and some work by Mark Townsend analysing the last row and column used in each file http://markstownsend.com/what-are-all-the-rows-for/index.html I downloaded the 7GB of 249,376 files and did some summary analysis … Continue reading

Posted in Excel/VBA, Research | Tagged , , | 1 Comment

VBA in the spreadsheets from the Enron email corpus

The European Spreadsheet Risk 2015 Conference papers are now available at http://www.eusprig.org/papers-presentations.htm My presentation was on investigating the use of VBA in spreadsheets in the Enron email corpus. Click to access VBA%20in%20spreadsheets%20from%20Enron%2CPO%27Beirne%202015.pdf Most of the slides deal with the mechanics … Continue reading

Posted in Excel/VBA, Research | Tagged , , , , | Leave a comment