diff --git a/Net2.0/Examples/Excel/C#/Example01/FinishDialog.Designer.cs b/Net2.0/Examples/Excel/C#/Example01/FinishDialog.Designer.cs index adfc0caadf..105d22fc8d 100644 --- a/Net2.0/Examples/Excel/C#/Example01/FinishDialog.Designer.cs +++ b/Net2.0/Examples/Excel/C#/Example01/FinishDialog.Designer.cs @@ -52,6 +52,7 @@ private void InitializeComponent() this.buttonOpenWorkbook.TabIndex = 3; this.buttonOpenWorkbook.Text = "Open Workbook"; this.buttonOpenWorkbook.UseVisualStyleBackColor = true; + this.buttonOpenWorkbook.Click += new System.EventHandler(this.buttonOpenDocument_Click); // // labelMessage // diff --git a/Net2.0/Examples/Excel/C#/Example01/Form1.cs b/Net2.0/Examples/Excel/C#/Example01/Form1.cs index 0ebb071911..1c44f9bdf2 100644 --- a/Net2.0/Examples/Excel/C#/Example01/Form1.cs +++ b/Net2.0/Examples/Excel/C#/Example01/Form1.cs @@ -53,9 +53,9 @@ private void button1_Click(object sender, EventArgs e) workSheet.get_Range(rangeAdressMouth).Interior.Color = ToDouble(Color.DarkGreen); // border the face with the border arround method - workSheet.get_Range(rangeAdressFace).BorderAround(XlLineStyle.xlDashDot, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexNone, Color.BlueViolet.ToArgb()); - workSheet.get_Range(rangeAdressEyes).BorderAround(XlLineStyle.xlDashDot, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexNone, Color.BlueViolet.ToArgb()); - workSheet.get_Range(rangeAdressNoise).BorderAround(XlLineStyle.xlDouble, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexNone, Color.BlueViolet.ToArgb()); + workSheet.get_Range(rangeAdressFace).BorderAround(XlLineStyle.xlDashDot, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexAutomatic); + workSheet.get_Range(rangeAdressEyes).BorderAround(XlLineStyle.xlDashDot, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexAutomatic); + workSheet.get_Range(rangeAdressNoise).BorderAround(XlLineStyle.xlDouble, XlBorderWeight.xlThin, XlColorIndex.xlColorIndexAutomatic); // border explicitly workSheet.get_Range(rangeAdressMouth).Borders[XlBordersIndex.xlEdgeBottom].LineStyle = XlLineStyle.xlDouble; diff --git a/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.csproj b/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.csproj new file mode 100644 index 0000000000..a37a5e5e58 --- /dev/null +++ b/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.csproj @@ -0,0 +1,76 @@ + + + + Debug + x86 + 9.0.30729 + 2.0 + {23785F27-FA4D-40AF-A940-7109981F52B9} + Exe + Properties + ConsoleApplication1 + ConsoleApplication1 + v3.5 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + + + + + + + + + + + {999801CF-F213-4DFC-9511-FF9B24B4B664} + ExcelApi + + + {65442327-D01F-4ECB-8C39-6D5C7622A80F} + LateBindingApi.Core + + + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94} + OfficeApi + + + {F4A471A9-63BE-4453-9C3B-826BF620B61F} + VBIDEApi + + + + + \ No newline at end of file diff --git a/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.sln b/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.sln new file mode 100644 index 0000000000..072e9ee98c --- /dev/null +++ b/Net2.0/Mass Tests/Excel/Write 1Million Cells/ConsoleApplication1.sln @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1.csproj", "{23785F27-FA4D-40AF-A940-7109981F52B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LateBindingApi.Core", "..\..\..\..\Source\Net v2.0 v3.0 v3.5\LateBindingApi.Core\LateBindingApi.Core.csproj", "{65442327-D01F-4ECB-8C39-6D5C7622A80F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfficeApi", "..\..\..\..\Source\Net v2.0 v3.0 v3.5\Office\OfficeApi.csproj", "{9B4FEC3A-AF4F-4841-96D0-A6896D196F94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBIDEApi", "..\..\..\..\Source\Net v2.0 v3.0 v3.5\VBIDE\VBIDEApi.csproj", "{F4A471A9-63BE-4453-9C3B-826BF620B61F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelApi", "..\..\..\..\Source\Net v2.0 v3.0 v3.5\Excel\ExcelApi.csproj", "{999801CF-F213-4DFC-9511-FF9B24B4B664}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {23785F27-FA4D-40AF-A940-7109981F52B9}.Debug|Any CPU.ActiveCfg = Debug|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Debug|x86.ActiveCfg = Debug|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Debug|x86.Build.0 = Debug|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Release|Any CPU.ActiveCfg = Release|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Release|Mixed Platforms.Build.0 = Release|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Release|x86.ActiveCfg = Release|x86 + {23785F27-FA4D-40AF-A940-7109981F52B9}.Release|x86.Build.0 = Release|x86 + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Debug|x86.ActiveCfg = Debug|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Release|Any CPU.Build.0 = Release|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {65442327-D01F-4ECB-8C39-6D5C7622A80F}.Release|x86.ActiveCfg = Release|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Debug|x86.ActiveCfg = Debug|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Release|Any CPU.Build.0 = Release|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9B4FEC3A-AF4F-4841-96D0-A6896D196F94}.Release|x86.ActiveCfg = Release|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Debug|x86.ActiveCfg = Debug|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Release|Any CPU.Build.0 = Release|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F4A471A9-63BE-4453-9C3B-826BF620B61F}.Release|x86.ActiveCfg = Release|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Debug|Any CPU.Build.0 = Debug|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Debug|x86.ActiveCfg = Debug|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Release|Any CPU.ActiveCfg = Release|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Release|Any CPU.Build.0 = Release|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {999801CF-F213-4DFC-9511-FF9B24B4B664}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Net2.0/Mass Tests/Excel/Write 1Million Cells/Program.cs b/Net2.0/Mass Tests/Excel/Write 1Million Cells/Program.cs new file mode 100644 index 0000000000..4d4dbf6149 --- /dev/null +++ b/Net2.0/Mass Tests/Excel/Write 1Million Cells/Program.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Excel = NetOffice.ExcelApi; + +namespace ConsoleApplication1 +{ + class Program + { + static void Main(string[] args) + { + // init api + LateBindingApi.Core.Factory.Initialize(); + + Console.WriteLine("Write 1 million cells in excel."); + + Excel.Application application = new NetOffice.ExcelApi.Application(); + application.DisplayAlerts = false; + application.Interactive = false; + application.ScreenUpdating = false; + + application.Workbooks.Add(); + + Excel.Worksheet workSheet = (Excel.Worksheet)application.Workbooks[1].Worksheets[1]; + + // row + for (int i = 1; i <= 10000; i++) + { + // column + for (int y = 1; y <= 100; y++) + { + Excel.Range cells = workSheet.Cells; + Excel.Range range = cells[i, y]; + range.Value = "TestValue"; + range.Dispose(); + cells.Dispose(); + } + + if (i % 100 == 0) + Console.WriteLine("{0} Cells written.", (i * 100)); + } + + // quit and dispose + application.Quit(); + application.Dispose(); + + Console.WriteLine("Done!"); + } + } +} diff --git a/Net2.0/Mass Tests/Excel/Write 1Million Cells/Properties/AssemblyInfo.cs b/Net2.0/Mass Tests/Excel/Write 1Million Cells/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b2399b9f95 --- /dev/null +++ b/Net2.0/Mass Tests/Excel/Write 1Million Cells/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("ConsoleApplication1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NetOffice")] +[assembly: AssemblyCopyright("Copyright © 2011")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("5ed817ab-e4cd-41d6-ac36-b6a6c83327bb")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]