Discussion:
Excel Tabelle erzeugen & Altes Format oder ungültige Typbibliothek
(zu alt für eine Antwort)
m***@googlemail.com
2006-06-27 09:23:35 UTC
Permalink
Brauche Hilfe!

Ich versuche ein neues excel Sheet zu erstellen. Beim durchlauf wird
excel im Hintergrund auch schon geöffnet, jedoch bekomme ich bei:

ExcelWorkbook = (Excel._Workbook)(ExcelApp.Workbooks.Add(Missing.Value
));
m***@googlemail.com
2006-06-27 09:36:36 UTC
Permalink
Post by m***@googlemail.com
Brauche Hilfe!
Ich versuche ein neues excel Sheet zu erstellen. Beim durchlauf wird
ExcelWorkbook = (Excel._Workbook)(ExcelApp.Workbooks.Add(Missing.Value
));
die Fehlermeldung:

An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in Test_I.exe

Addtional Information: Altes Format oder ungültige Typbibliothek


Was ist da falsch??
m***@googlemail.com
2006-06-27 10:38:37 UTC
Permalink
hab ne Lösung gefunden, folgende zeile muss in den Code eingefügt
werden, dann geht es:

System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
Thomas Scheidegger [MVP]
2006-06-27 10:53:07 UTC
Permalink
Hallo
Post by m***@googlemail.com
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
das Problem liegt also vermutlich an anderem, nicht geposteten Code...?
P.S. Anstelle obiger Culture geht dann evtl. auch :
.....CurrentCulture = CultureInfo.InvariantCulture
--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Loading...