Autor Beitrag
tomycat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Mo 09.05.16 20:03 
hallo,
ich möchte gerne den Inhalt von einem datagridview in einer Excel Datei speichern.

Meine Vorlage:
code.msdn.microsoft....ataGridView-62f1f8ff

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
......
        private void ExportToExcel()
        {
            // Creating a Excel object.
            Microsoft.Office.Interop.Excel._Application excel = new Microsoft.Office.Interop.Excel.Application();       
            Microsoft.Office.Interop.Excel._Workbook workbook = excel.Workbooks.Add(Type.Missing);
            Microsoft.Office.Interop.Excel._Worksheet worksheet = null;

            try
            {
......


Alle Wörter mit Office sind Rot unterschriechen.
Laut google suche soll ich : add ref. > Microsoft.Office... // gibts es aber nicht.

o2010pia.exe habe ich auch installiert, aber ohne Erfolg.

Moderiert von user profile iconChristian S.: Code- durch C#-Tags ersetzt
Moderiert von user profile iconTh69: Beitragsformatierung überarbeitet (und .NET Version auf 4.5 gesetzt, anstatt Silverlight).
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mo 09.05.16 20:20 
Wenn ich das richtig in Erinnerung habe wirst du beim Visual Studio Setup gefragt ob du die Office Developer Tools mit installieren willst. Am besten nochmal das Setup starten und die mit auswählen.
Je nach Version von Visual Studio (ie. Express und/oder Cmmunity) sind die aber möglicherweise nicht dabei.

Für diesen Beitrag haben gedankt: tomycat
tomycat Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Mo 09.05.16 20:36 
hab setup (vs2015)nochmal ausgeführt, leider gibts kein office blabla
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mo 09.05.16 20:45 
Wenn es da ist dann hier

vs2015setup
Einloggen, um Attachments anzusehen!

Für diesen Beitrag haben gedankt: tomycat
tomycat Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Mo 09.05.16 21:09 
naja du hast die Prof :-)
Der Tipp -----------> Office Developer Tools......war Goldwert !!!
Für alle die nicht die Prof 2015 haben:
www.visualstudio.com...office-tools-vs.aspx
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Mo 09.05.16 21:13 
oh äh ja klar .... oder einfach runterladen :oops: