T
Tim_Mac
hi,
i need to use DAO to read the correct order of worksheets in an excel
file. ADOX uses the original ordering and disregards any worksheet
shuffling that the user may have done. I need the order as it appears
to the user. If i don't need to use COM at all that would be ideal,
but i haven't been able to find viable alternatives. I don't like the
sound of automation because it is a reasonably critical server that
this code will run on, apparently server-side automation is dodgy from
a security and stability point of view.
here is the c# code i'm using, with a COM reference to the DAO 3.6
library.
DAO.DBEngineClass engine = new DAO.DBEngineClass();
DAO.Database db = engine.OpenDatabase(path, null, true, "Excel 8.0;");
The second line above causes the following exception:
"QueryInterface for interface DAO._DBEngine failed"
i found a possibly related post at
http://groups.google.com/group/micr...&q=QueryInterface+DAO&rnum=2#f5268bf372b08b66
but i tried james' solution to no avail.
can anyone suggest a solution? i'm really stuck here!
thanks in advance
tim
i need to use DAO to read the correct order of worksheets in an excel
file. ADOX uses the original ordering and disregards any worksheet
shuffling that the user may have done. I need the order as it appears
to the user. If i don't need to use COM at all that would be ideal,
but i haven't been able to find viable alternatives. I don't like the
sound of automation because it is a reasonably critical server that
this code will run on, apparently server-side automation is dodgy from
a security and stability point of view.
here is the c# code i'm using, with a COM reference to the DAO 3.6
library.
DAO.DBEngineClass engine = new DAO.DBEngineClass();
DAO.Database db = engine.OpenDatabase(path, null, true, "Excel 8.0;");
The second line above causes the following exception:
"QueryInterface for interface DAO._DBEngine failed"
i found a possibly related post at
http://groups.google.com/group/micr...&q=QueryInterface+DAO&rnum=2#f5268bf372b08b66
but i tried james' solution to no avail.
can anyone suggest a solution? i'm really stuck here!
thanks in advance
tim