+ Reply to Thread
Results 1 to 5 of 5

Cannot open xlsm file. the file format is invalid error on opening and saving

  1. #1
    Forum Contributor
    Join Date
    07-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    141

    Cannot open xlsm file. the file format is invalid error on opening and saving

    Hi, My son has got the above error while trying to open a macro enabled xlsm file. He has saved it correctly by entering data, on a production tracker file, which is macro enabled file.
    On opening, he got the error and there was no pop up of recovering option of the file usually comes when you just open excel workbook.
    There was no previous version available in the properties tab either.
    He has lost he total data entered in that , and he has to open a new xlsm file to enter all the things again.
    Is there any trick that a similar file is saved on the back ground as another file, so that if any corruption has happened to the current file, he could use the alternative file.
    Where the saved one gone.
    Is that the macro updation by developer the cause for it.
    I think, I am not sure, that the file is updated regularly by the employees.
    I want solution, to get the data in case of any failure of the original file.
    More could not be known, as nothing is allowed at individual level and everything is not allowed to manipulate.
    Even copying and making some mild changes not allowed.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Cannot open xlsm file. the file format is invalid error on opening and saving

    Backups are important, but if you back up a corrupt file, depending on the type of backup system you use, you can only recover the corrupt version.

    https://www.excelforum.com/tips-and-...ml#post5613970

    Here is an application that allows you to keep multiple versions of the same file. Typically, I save the last 5 versions of a file, but you can save as many versions as you are willing to create backup files for.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    07-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    141

    Re: Cannot open xlsm file. the file format is invalid error on opening and saving

    hi, dflak. thanks for your suggestion.
    Normally excel will repair the file, if it contains any characters that is not supported. Is it not
    I have recovered so many files , by this automatic repair.
    Does any virus responsible for this sudden corruption
    or, the update to the program by developers of this xlsm is the cause.
    Please give me clues

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Cannot open xlsm file. the file format is invalid error on opening and saving

    This is not likely to be a virus. If you are attempting to recover an already corrupt file, I have no suggestions other than a long shot.

    Excel files are actually a collection of XML files. Take the Excel file and remove the XLSX (or whatever) extension. Then add a .ZIP extension and try opening it. If this works, then you will see a collection of files and folders. Save .ZIP file, preferably under a different name. Then restore the original file extension and try to open it.

  5. #5
    Registered User
    Join Date
    12-22-2022
    Location
    California
    MS-Off Ver
    2016
    Posts
    21

    Re: Cannot open xlsm file. the file format is invalid error on opening and saving

    Hi Rajuj,

    An Excel file gets corrupted due to various reasons such as a virus/malware attack, sudden system shutdown when the Excel file is still open, power failure while working with an Excel spreadsheet, etc.

    As your excel file is a macro-enabled .xlsm file, I suggest you try the following workarounds-

    1. Set the Calculation Option in Excel to Manual-
    Go to File > New.
    Click on Blank workbook under the Available Templates tab.
    Then Go to File > Options.
    The Excel Options window is displayed, Click the Formulas option.
    Go to the Workbook Calculation section and click on the Manual option.
    Click on OK.
    Click on the Open tab in the File menu.
    Choose the desired corrupted workbook and then click on Open.
    2. Open and Repair-

    I think you have already done this.

    If none of these work for you, I suggest you use a professional excel recovery tool that gives you the accessibility to preview your data like Stellar does.


    Best Regards.
    Last edited by Chris5; 02-24-2023 at 08:21 AM. Reason: indent problem

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error:Invalid File format,while opening an Excel Template file
    By Saurabh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2022, 06:50 AM
  2. [SOLVED] VBA + File opening error handler if password is entered wrong to open the file
    By benoj2005 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-15-2021, 02:03 PM
  3. i get this error when opening my xlsm file
    By beekobeeko in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2018, 02:24 PM
  4. [SOLVED] Error handling when saving a file as a PDF and file is already open
    By JonathanEngr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2018, 03:11 PM
  5. Replies: 3
    Last Post: 05-21-2013, 08:22 AM
  6. Replies: 6
    Last Post: 05-01-2013, 05:33 PM
  7. Error in opening file and saving a file
    By uday1969 in forum Excel General
    Replies: 1
    Last Post: 11-03-2012, 06:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1