Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct `XlFileFormat` enumeration for Excel 97-2003

Tags:

excel

interop

vba

In regards to Excel VBA Interop, what is the correct XlFileFormat enumeration for saving an Excel 97-2003 spreadsheet?

The official MSDN documentation is here but I can't figure out from reading this what the correct selection is.

Thanks

like image 551
JMK Avatar asked Aug 28 '12 12:08

JMK


1 Answers

Excel 97 was version 8. Subsequent releases up to and including Excel 2003 had very minor changes. Until Excel 2007, version 12. Which is why you see xlExcel9 through 11 missing from the enumeration.

So you'll want xlExcel8 here.

like image 56
Hans Passant Avatar answered Oct 21 '22 12:10

Hans Passant