Error in loading excel file in windows 7 ...
-
Hi all ! in my project to reading an excel file , there is no problem in windows XP , but in Win Seven(7) , I have problem to reading the excel 2007 file . here in some part of code :
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;""", openFileDlgData.FileName);
string SheetName = "Test";
string query = String.Format(@"select * from [{0}$]", SheetName);
try
{
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, conn);
System.Data.DataTable dt = new System.Data.DataTable("ExcelData");
dataAdapter.Fill(dt);
...Thanks in any help !
-
Hi all ! in my project to reading an excel file , there is no problem in windows XP , but in Win Seven(7) , I have problem to reading the excel 2007 file . here in some part of code :
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;""", openFileDlgData.FileName);
string SheetName = "Test";
string query = String.Format(@"select * from [{0}$]", SheetName);
try
{
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, conn);
System.Data.DataTable dt = new System.Data.DataTable("ExcelData");
dataAdapter.Fill(dt);
...Thanks in any help !
What problem do you have? That's the important part that's missing from your question.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
What problem do you have? That's the important part that's missing from your question.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
System.InvalidOpertionException:The 'Microsoft.ACE.OLEDB.12.0' provider
-
Hi all ! in my project to reading an excel file , there is no problem in windows XP , but in Win Seven(7) , I have problem to reading the excel 2007 file . here in some part of code :
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;""", openFileDlgData.FileName);
string SheetName = "Test";
string query = String.Format(@"select * from [{0}$]", SheetName);
try
{
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, conn);
System.Data.DataTable dt = new System.Data.DataTable("ExcelData");
dataAdapter.Fill(dt);
...Thanks in any help !
32 or 64 bit?
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
-
32 or 64 bit?
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
64 bit
-
Hi all ! in my project to reading an excel file , there is no problem in windows XP , but in Win Seven(7) , I have problem to reading the excel 2007 file . here in some part of code :
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;""", openFileDlgData.FileName);
string SheetName = "Test";
string query = String.Format(@"select * from [{0}$]", SheetName);
try
{
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, conn);
System.Data.DataTable dt = new System.Data.DataTable("ExcelData");
dataAdapter.Fill(dt);
...Thanks in any help !
-
64 bit
nassimnastaran wrote:
64 bit
That is probably your problem.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012