change 400 files from xlsb to xlsx

  • Thanks to AlphaFrog at MrExcel for this:


  • Thanks to AlphaFrog at MrExcel for this:



    its works but after that the problem is the files can not open any more.
    we saved these files in xlsb format and now we want to saved them in xlsx format
    i think we should write a vba to open each file and save it as xlsb formats.
    [ATTACH=JSON]{"alt":"Click image for larger version Name:\terorr.jpg Views:\t1 Size:\t15.3 KB ID:\t1206184","data-align":"none","data-attachmentid":"1206184","data-size":"full","title":"erorr.jpg"}[/ATTACH]

  • its works but after that the problem is the files can not open any more.
    we saved these files in xlsb format and now we want to saved them in xlsx format
    i think we should write a vba to open each file and save it as xlsb formats.
    [ATTACH=JSON]{"alt":"Click image for larger version Name:\terorr.jpg Views:\t1 Size:\t15.3 KB ID:\t1206184","data-align":"none","data-attachmentid":"1206184","data-size":"full","title":"erorr.jpg"}[/ATTACH]


    this works for me:



    place in a different folder to the files you want to change
    run it then select folder


    [Blocked Image: https://puu.sh/B56tg/f44bb9fdfa.png]

  • i attached one of my 400 files.i removed some sheets to reduce size.
    your vba works but saved as xlsb. i need to change them to xlsx.

    Files

    • aaa.xlsb

      (218.26 kB, downloaded 161 times, last: )
  • Change this line of code


    Code
    1. wb.SaveAs Filename:=fpath & ".xlsb", FileFormat:= _
    2. xlExcel12, CreateBackup:=False


    to


    Code
    1. wb.SaveAs Filename:=fpath & ".xlsx", FileFormat:= _
    2. xlExcel12, CreateBackup:=False
  • And change xlExcel12 to xlOpenXMLWorkbook


    And add: application.displayalerts = false to the beginning,or the message will pop up about saving macro free for every file. Set to true at end of code