Hallo zusammen,
ich habe einen zugriff auf eine Excel datei Text für conString wird usammengebaut da :
Jetzt habe ich das Problem das die connection fehl schlägt wenn die Datei bereits durch einen Nutzer mit Excel geöffnet ist.
Ich fange das zwar mit einer "ist schon offen, versuchen sie es später" Meldung ab aber da der zugriff nur ein Lesender sein muss hatte ich gehoft es gibt eine "öffne Schreibgeschützt" einstellung für die OleDbConnection
ich habe einen zugriff auf eine Excel datei Text für conString wird usammengebaut da :
VB.NET-Quellcode
- Provider = "Microsoft.ACE.OLEDB.12.0"
- ExProp = "Excel 12.0"
- 'oder auch --- Je nach dem wecher Treiber zur Verfügung steht.
- Provider = "Microsoft.Jet.OLEDB.4.0"
- ExProp = "Excel 8.0"
- Dim con As New OleDbConnection(String.Format("Data Source={0};Provider={1};Extended Properties=""{2};HDR={3};IMEX=1""", DateiName, Provider, ExProp, If(Kopfzeile, "Yes", "No")))
Jetzt habe ich das Problem das die connection fehl schlägt wenn die Datei bereits durch einen Nutzer mit Excel geöffnet ist.
Ich fange das zwar mit einer "ist schon offen, versuchen sie es später" Meldung ab aber da der zugriff nur ein Lesender sein muss hatte ich gehoft es gibt eine "öffne Schreibgeschützt" einstellung für die OleDbConnection
There is no CLOUD - just other people's computers
Q: Why do JAVA developers wear glasses?
A: Because they can't C#
Daily prayer:
"Dear Lord, grand me the strength not to kill any stupid people today and please grant me the ability to punch them in the face over standard TCP/IP."
Q: Why do JAVA developers wear glasses?
A: Because they can't C#
Daily prayer:
"Dear Lord, grand me the strength not to kill any stupid people today and please grant me the ability to punch them in the face over standard TCP/IP."