: , PIA . , Excel . Excel PIA, , , , Excel, PIA.
, Excel , , , , Excel.Application.Version , "11.0" "9.0a" , . , ( "." ) , , :
Excel.Application excelApp = new Excel.Application();
string versionName = excelApp.Version;
int length = versionName.IndexOf('.');
versionName = versionName.Substring(0, length);
int versionNumber = int.Parse(versionName, CultureInfo.GetCultureInfo("en-US"));
if (versionNumber >= 12)
{
}
else
{
}
PIA vs. Excel, (PIA) , PIA , . , PIA Excel 2002, Excel 2007, ( ) PIA Excel 2007. , PIA , , .
, ( ) , , Excel 2007, , PIA Excel 2003. , Excel 2007 , PIA Excel 2003. : PIA Excel 2007, , , - Excel 2003 - Excel 2003 , PIA Excel 2007.
. , , (1) Excel, (2) Excel , PIA ( , , PIA , ).
. Andrew Whitechapel VS Office?
, Excel , , 100% . , Excel PIA, Excel , . , , , , Excel . , PIA, - PIA, ( ), , PIA .
: phsr:
, , PIA , . PIA, ( "xls" vs "xlsx" ). 2007 "xls", . . , ( ), (, ).
, "" , PIA, Excel, , , PIA. , 99,9% , Excel PIA. , . , , Excel, PIA ( PIA , PIA, ).
, PIA , . Excel 2003 SaveAs , Excel 2007 SaveAs , PIA . , SaveAs, , Excel .
, :
(1) , Excel, . , , . , , , .
(2) , . Excel . , ".xls" Excel 2007, , . , Excel ".xls" ".xlsx" , , Excel :
Excel.Application excelApp = new Excel.Application();
Excel.Workbook workbook = excelApp.Workbooks.Add(Type.Missing);
workbook.SaveAs(
"MyWorkbook", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
"MyWorkbook.xls" "MyWorkbook.xlsx", , Excel . , Excel , .