1

I'm having the following issue: I've an Excel spreadsheet with a lot of VBA codes and ActiveX controls, including RExcel formulas.

The Excel version is 2007.

When I try to open this file, Task Manager says Excel isn't answering and something starts like if Excel started running endless codes; I deactivated each control and it still seems broken.

I would like to recover at least some formulas I've written in that spreadsheet, but this is actually impossible by opening the spreadsheet in conventional way.

Could you tell me how I can "read" formulas and text in that spreadsheet without opening it by Excel?

Thanks,

Lisa Ann
  • 3,345
  • 6
  • 31
  • 42
  • 1
    Have you tried just opening the workbook while the VBE is in break mode? This will prevent code from running. – Daniel Nov 07 '12 at 18:36
  • or opening the file with the Shift key held? – nutsch Nov 07 '12 at 18:38
  • Yes, in break mode I can see VB code but the spreadsheet still does not work. It starts like an endless refreshing of cells. Further details: calculation is in manual mode, not automatic; I cannot just copy VB code because code I need is R code written as text in spreadsheet's cells, then I need to select and copy it. – Lisa Ann Nov 07 '12 at 18:40
  • If I try SHIFT + opening it, Excel returns me an error saying I cannot modify it :( – Lisa Ann Nov 07 '12 at 18:41
  • Try using [openoffice](http://www.openoffice.org/). I've used this before to recover a corrupt Excel file that Excel froze on – brettdj Nov 08 '12 at 08:18
  • Since you are a R user, you could try to read that workbook using packages like `xlsx` or `XLConnect`. They use a Java API, not Excel itself. – flodel Nov 08 '12 at 11:39

2 Answers2

1

Indeed have calculation set to manual for a start.

Now set your security settings such that macros and activeX are disabled:

Excel Options > Trust Center > Trust Center Settings... > Macro Settings > Disable all macros with notification

For ActiveX I am not sure if there is a menu in excel-2007 like for macros, but if there is make sure it is set to not run as well.

Now you can open your excel workbook and it will not run your macro's and shouldn't auto calculate or update!

ADDED: I have had something like this in the past and this is what worked in 1 occasion: install an other office excel application, like open office (the calc application has the excel functionality) and see if it opens in that application. Then if it does, save the file (under another file name) and close it. Open the new file under MS Office Excel, and see what is still recoverable.

Good luck!

K_B
  • 3,668
  • 1
  • 19
  • 29
  • This is absurd: I've just done as you suggested, in addition I've disabled ActiveX controls, too. Nothing changed. It almost looks like... a graphics' issue, like if Excel did not succeed in visualizing cells (this is just my realization). – Lisa Ann Nov 07 '12 at 18:59
  • The best I've done so far was to end Excel process in order it tried to recover the corrupted file. Then I opened a new empty Excel session, and it allows me to recover a modified version of the corrupted file. This "corrected" version lacks of **lot** of the original code and formulas, but there are few things I can recover to rebuild them... This is better than losing everything. – Lisa Ann Nov 07 '12 at 19:33
1

use a tool like 7zip to extract the files. the sheets/formulas are in the .xml

xlsm opened with 7zip

the code in a macro enabled spreadsheet is in a .bin file
this can be read with MalOfficeScanner

SeanC
  • 15,695
  • 5
  • 45
  • 66