Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a large spreadsheet in which many of the cells contain formulas.

How can I produce a delimited-text version of this spreadsheet such that all formulas appear as the text of their source code?

For example, for a spreadsheet in which column A is


cell B1 is set to =SUM(A:A), and all remaining cells are empty, if we did "Save As" CSV, the resulting *.csv file would look like this (last two cells of second column are empty):


In contrast, what I want would look this:


In fact, the non-formula values are unimportant (except as placeholders), so the alternative below would be fine too. Here the only non-empty cells are those corresponding to the formula-containing cells in the original sheet; in this case, the leading '=' can can be omitted from the non-empty cells:



PS. I'm VBA-illiterate, so I'd like to avoid it if at all possible.

share|improve this question
up vote 8 down vote accepted

I just tested it and it's a lot easier than I thought to get output like the 2nd case you specified.

Do the following:

  1. Input all your data/formulas
  2. Select the Show Formulas button (via Formulas > Formula Auditing in Excel 2007)
  3. Save As filetype CSV(MS-DOS)
  4. Open resultant file in Notepad to verify.

I'll play around with it for a bit more to see if I can get it to pare down the formulas like you mentioned in case 3.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .