Forum Discussion

SunnySchindler's avatar
5 years ago
Solved

How get all sheet all workbooks folder ? stops at row error "File corrupt"

Power Query M stops at row 310 which shows "DataFormat.Error: File contains corrupted data". Assuming corruption is from a Workbook, how to get all workbooks w/o fixing corruption? = Excel.Workbook...
  • SunnySchindler's avatar
    4 years ago

    This is what I did to solve: Move all non-Excel documents to temporary folder beyond script reach.

    I used

    robocopy t:\ s:\ /L /S /MOVE /XF *.xl*

    which should but didn't catch all png and txt files.

    robocopy t:\ d:\ /S /MOVE *.png 

    robocopy t:\ d:\ /S /MOVE *.txt

     

    Scripting should be capable to exclude non-Excel documents but beyond my current capability.