PdfRpt.DataSources.ExcelDataReaderDataSource.getConnectionString C# (CSharp) Method

getConnectionString() private method

private getConnectionString ( ) : string
return string
        private string getConnectionString()
        {
            var connectionString = string.Format(CultureInfo.InvariantCulture, "Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES\"", _filePath);
            if (Path.GetExtension(_filePath).ToUpperInvariant() == ".XLSX")
            {
                connectionString = string.Format(CultureInfo.InvariantCulture, "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;IMEX=1;HDR=YES;\"", _filePath);
            }
            return connectionString;
        }