In my program I have to load a excel-file. This file can have the following extensions: [.xls][.xlsx][.xlsm][.xlsb].
Excel07+ can handle all of these by nature, but to work with [.xlsx][.xlsm][.xlsb] in Excel2003 you have to install the http://www.microsoft.com/en-us/download/details.aspx?id=3
Here is my code to determine, which excelversion is installed. Problem: I don´t know how to determine an installation of the compatibility pack (marked by +++)
if (ExtractFileExt(sFileNameVorlage) = '.xlsx') or
(ExtractFileExt(sFileNameVorlage) = '.xlsm') or
(ExtractFileExt(sFileNameVorlage) = '.xlsb') then
begin
//determine version of excel (lower or equal 2003 )
if StrToInt(Copy(oVersionscheck.version,1,2)) <= 11 then
begin
// equal 2003
if StrToInt(Copy(oVersionscheck.version,1,2)) = 11 then
if not +++compatibility pack installed?+++ then
begin
ShowMessage('Warning: Excel can´t open this file.');
oVersionscheck.Quit;
oVersionscheck := unassigned;
Exit;
end;
end;
oVersionscheck.Quit;
end;
Perhaps someone knows a solution.