+ Reply to Thread
Results 1 to 4 of 4

Why Does Excel Recalculate When Opening a CSV File?

  1. #1
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    202

    Why Does Excel Recalculate When Opening a CSV File?

    I am running Excel 2007, working on an .XLSM file that was originally created as an .XLSX file in a later version (it includes some formulas using UNIQUE and FILTER functions, which are not recognized by my version of Excel).
    It takes a significant time to recalculate (about 10 seconds), and it recalculates every time you change ANYTHING (so I'm guessing it has some other volatile functions somewhere).
    I have it set to manual recalculation so I can work on it efficiently.
    If I open another .XLSX file (while this main file is open), that file opens immediately (although it does show "Calculate" due to the manual calculation).
    BUT if I open a CSV file (manually, or through a macro), Excel recalculates the main file each time (before opening the CSV file). Even when the main file is set to manual recalculation!
    Since I've set up a macro that loads data from 7 different CSV files (into this main file), this recalculation delay means that the macro, which should run in about 1 second, takes well over a minute to complete.

    Can anyone shed light on (1) WHY does Excel recalculate (in manual calculation mode) when opening a CSV file, and (2) is there anything I can add to the macro code to avoid this?

  2. #2
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Why Does Excel Recalculate When Opening a CSV File?

    Why does MSFT do anything?

    It is what it is.

    I confirmed what you describe: open a workbook with volatile formulas (*), set Manual Calculation mode, then open a CSV file in the Excel instance.

    The first workbook is recalculated, even though the (application) calculation mode remains Manual.

    (Good to know for those of us who try to help others with otherwise inexplicable behaviors. Thanks.)

    In any case, that does not happen when we create a new worksheet after Step 1.

    And that does not happen when we create a new workbook after Step 1.

    And it does not happen when we subsequently import a CSV file into a new worksheet or workbook instead of opening the CSV file directly.

    So that might be a useful work-around.


    -----
    (*) For simplicity, I do the following after opening the first workbook (Step 1):

    1. Enter the formula =RAND() into a cell (e.g. A1)
    2. Set Manual Calculation mode
    3. Copy A1 and paste-value onto another cell (e.g. B1)
    4. Enter the formula =A1=B1 into a third cell (e.g. C1)

    C1 displays TRUE initially.

    It displays FALSE inexplicably after we open a CSV file in the same Excel instance.

    OTOH, C1 continues to display TRUE after we import a CSV file.
    Last edited by curiouscat408; 12-25-2022 at 09:43 PM. Reason: cosmetic

  3. #3
    Forum Contributor
    Join Date
    03-26-2015
    Location
    Cookeville, TN
    MS-Off Ver
    Excel 365
    Posts
    202

    Re: Why Does Excel Recalculate When Opening a CSV File?

    Thanks for the tip about importing the data (rather than opening the CSV file directly)! I do need to check the data and pull it into specific columns, but if all else fails, I can always import the raw CSV data to a blank worksheet, and then check / manipulate it from there (like I would do from the opened CSV file).

  4. #4
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Why Does Excel Recalculate When Opening a CSV File?

    You're welcome.

    For posterity, I forgot to mention that I use Excel 2010. And you use Excel 2007.

    So this misbehavior might have been corrected in a more recent version of Excel. TBD.
    Last edited by curiouscat408; 12-25-2022 at 10:19 PM.

+ 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. Replies: 1
    Last Post: 01-19-2019, 09:04 PM
  2. vba code for opening excel file and insert a new column in exisiting excel file
    By saratu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-21-2014, 02:55 PM
  3. Replies: 2
    Last Post: 05-31-2014, 02:05 AM
  4. Replies: 3
    Last Post: 01-14-2014, 10:57 AM
  5. Replies: 4
    Last Post: 01-24-2012, 12:52 PM
  6. Opening EXCEL with a specific file opening also
    By HitTheEXCELerator in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2011, 12:51 PM
  7. [SOLVED] opening an excel file opens a duplicate file of the same file
    By skm in forum Excel General
    Replies: 1
    Last Post: 12-07-2005, 01:55 PM

Tags for this Thread

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