Skip to content

Commit

Permalink
- change release tag 0.8 (excel example01 c#)
Browse files Browse the repository at this point in the history
- add mass tests folder
- add excel mass test (write 1 million cells)

Imported from NetOffice r74711
https://netoffice.codeplex.com/SourceControl/changeset/74711
  • Loading branch information
SebastianDotNet authored and jozefizso committed Nov 4, 2014
1 parent 8980246 commit 7cbe254
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Net2.0/Examples/Excel/C#/Example01/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{23785F27-FA4D-40AF-A940-7109981F52B9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleApplication1</RootNamespace>
<AssemblyName>ConsoleApplication1</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Source\Net v2.0 v3.0 v3.5\Excel\ExcelApi.csproj">
<Project>{999801CF-F213-4DFC-9511-FF9B24B4B664}</Project>
<Name>ExcelApi</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Source\Net v2.0 v3.0 v3.5\LateBindingApi.Core\LateBindingApi.Core.csproj">
<Project>{65442327-D01F-4ECB-8C39-6D5C7622A80F}</Project>
<Name>LateBindingApi.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Source\Net v2.0 v3.0 v3.5\Office\OfficeApi.csproj">
<Project>{9B4FEC3A-AF4F-4841-96D0-A6896D196F94}</Project>
<Name>OfficeApi</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Source\Net v2.0 v3.0 v3.5\VBIDE\VBIDEApi.csproj">
<Project>{F4A471A9-63BE-4453-9C3B-826BF620B61F}</Project>
<Name>VBIDEApi</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Original file line number Diff line number Diff line change
@@ -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
52 changes: 52 additions & 0 deletions Net2.0/Mass Tests/Excel/Write 1Million Cells/Program.cs
Original file line number Diff line number Diff line change
@@ -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!");
}
}
}
Original file line number Diff line number Diff line change
@@ -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")]

0 comments on commit 7cbe254

Please sign in to comment.