Alan:
It's only been 25 years since I've tried office automation, but, ...
Why are you using XLSRCEXTERNAL? I may be reading the MS page wrong, but have you tried using xlSrcQuery since you're specifying an OLEDB connection string?
On Fri, Jun 13, 2025 at 6:47 AM Alan Bourke alanpbourke@fastmail.fm wrote:
Any Excel automation mavens in the audience? I'm trying to automate what Excel does when you do 'Get Data' from Text\CSV via PowerShell. I've recorded that process as a macro and the code in the linked Gist is attempting to replicate the macro VBA.
However no matter what I do it throws a 1426 COM error '800a03ec: Unknown COM status code' when attempting to add to the Workbook ListObjects collection.
https://learn.microsoft.com/en-us/office/vba/api/excel.listobjects.add
Probably something stupid - can anyone see any issue with the code ?
https://gist.github.com/AlanPBourke/091e4aa607239fa69d5f544e31bc958b
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]