Does ACE OLEDB drivers have any known issues with larger files? I am using the below code to retrieve the worksheets in a 400Mb xls file
public string[] GetWorkSheets()
{
var connectionString = "Provider=Microsoft.ACE.OleDb.12.0; data source=c:\filepath\filename.xls; Extended Properties=\"Excel 8.0;IMEX=1;HDR=YES;\"";
DataTable dataTable;
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
connection.Open();//Exception thrown here for large files
dataTable = connection.GetSchema("Tables");
}
int lenght = dataTable.Rows.Count;
string[] worksheets = new string[lenght];
for (int i = 0; i < lenght; i++)
{
worksheets[i] = dataTable.Rows[i]["TABLE_NAME"].ToString();
}
return worksheets;
}
I receive a OleDbException with the message System resource exceeded. I am not calling this function in loops, or opening any other connection before I reach here. This code works perfectly for smaller files.
My system has 4Gb RAM.Runs on Windows 7 64Bit. The Ace driver is also 64bit.
Any idea what can be done on fix this issue?
read this article
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx
maybe your file has more then 1,048,576 rows by 16,384 columns?