Yoann. B
Yoann. B

Reputation: 11143

Converting Excel 2003 Workbook to Excel 97 in C#

How would I convert and Excel 2003 Open XML Workbook to Excel 97 Format using C#?

Upvotes: 1

Views: 1930

Answers (4)

Joe Erickson
Joe Erickson

Reputation: 7217

Do you mean Excel 2007 Open XML? There is no Excel 2003 Open XML format. There is an Excel 2003 SpreadsheetML format which is an XML format that is incomplete as well as being a dead end format.

SpreadsheetGear for .NET can read and write both Excel 97-2003 (xls) workbooks and Excel 2007 Open XML (xlsx) workbooks and will convert between the two formats.

There is a free evaluation if you want to try it out.

Disclaimer: I own SpreadsheetGear LLC

Upvotes: 0

chiccodoro
chiccodoro

Reputation: 14716

You could try following:

  1. Start Excel
  2. Start Macro recording mode
  3. Open an open-xml workbook.
  4. Save it as Excel 97.
  5. Stop Macro recording mode.
  6. View the generated VBA code and port it to C# using the VS tools for Office mentioned by Nathan.

Upvotes: 0

Nathan DeWitt
Nathan DeWitt

Reputation: 6601

Using Visual Studio Tools for Office, open the workbook and then do a SaveAs, select Excel 97 as the format type.

Upvotes: 1

Andrew Hare
Andrew Hare

Reputation: 351466

Is it simply data or are there formulas and VBA? If it is just data you could read in the file as XML and do use an XSLT to convert the data to a CSV file.

Upvotes: 1

Related Questions