Cannot figure out what is causing "Cannot index into a null array" error
ImranMoTown opened this issue · 3 comments
Something in this workbook is raising this error:
Failed importing the Excel workbook 'C:\Data\CopiedData.xlsm' with worksheet 'Sheet1': Cannot index into a null array.
This workbook is a pared down version of a much larger workbook, I've deleted all other sheets, all other data, all vba code, everything except the header column row and the one row of data.
This is my call to ImportExcel:
$Data = Import-Excel -Path "C:\Data\CopiedData.xlsm" -ImportColumns 1,2 -WorksheetName "Sheet1" -DataOnly -StartRow 1 -AsText "*";
I've found that regardless of what I put in the WorksheetName param, I get the same result, even if I omit the WorksheetName param, I get the same result.
See attached zipped up .xlsm file
CopiedData.zip
Tried versions 7.8.6 and 7.8.9
Really appreciate any help anyone can provide.
Agreed, was hoping for some insight into what it was. This is one of several dozen large workbooks. Rebuilding them will be a huge task.
Yes, understood, sorry. I have not be able to track those down, and have seen hardly any over the years.
