Browse Source
- Included SetIsRightToLeftInXlsx sample project
- Included SetIsRightToLeftInXlsx sample project
- Removed and sorted using directives - Changed .gitignore to ignore NuGet examples\packages folderpull/22/head

17 changed files with 288 additions and 18 deletions
-
5.gitignore
-
21examples/NPOI.XSSF.Examples.2010.sln
-
15examples/hssf/ConvertExcelToHtml/ConvertExcelToHtml.csproj
-
7examples/hssf/ConvertExcelToHtml/Program.cs
-
1examples/hssf/ConvertExcelToHtml/Properties/AssemblyInfo.cs
-
5examples/hssf/ConvertExcelToHtml/packages.config
-
76examples/xssf/MeringCellsInXlsx/MergingCellsInXlsx.csproj
-
6examples/xssf/ScatterChart/Program.cs
-
5examples/xssf/SetCellValuesInXlsx/SetCellValuesInXlsx.csproj
-
39examples/xssf/SetIsRightToLeftInXlsx/Program.cs
-
36examples/xssf/SetIsRightToLeftInXlsx/Properties/AssemblyInfo.cs
-
75examples/xssf/SetIsRightToLeftInXlsx/SetIsRightToLeftInXlsx.csproj
-
3examples/xssf/SetIsRightToLeftInXlsx/app.config
-
3examples/xwpf/CreateEmptyDocument/app.config
-
3examples/xwpf/SimpleDocument/app.config
-
3examples/xwpf/SimpleTable/app.config
-
3examples/xwpf/UpdateEmbeddedDoc/app.config
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<packages> |
|||
<package id="NPOI" version="2.0.6" targetFramework="net20" /> |
|||
<package id="SharpZipLib" version="0.86.0" targetFramework="net20" /> |
|||
</packages> |
@ -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>8.0.30703</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{E370B5B7-8679-4FBA-BB7B-EDD035245F03}</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>MeringCellsInXlsx</RootNamespace> |
|||
<AssemblyName>MeringCellsInXlsx</AssemblyName> |
|||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<TargetFrameworkProfile /> |
|||
</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="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\ICSharpCode.SharpZipLib.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI, Version=1.2.5.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OOXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OOXML.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OpenXml4Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OpenXml4Net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OpenXmlFormats, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OpenXmlFormats.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="app.config" /> |
|||
</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> |
@ -0,0 +1,39 @@ |
|||
using NPOI.SS.UserModel; |
|||
using NPOI.XSSF.UserModel; |
|||
using System.IO; |
|||
|
|||
namespace NPOI.Examples.XSSF.SetIsRightToLeftInXlsx |
|||
{ |
|||
class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
IWorkbook workbook = new XSSFWorkbook(); |
|||
|
|||
ISheet sheet1 = workbook.CreateSheet("Sheet1"); |
|||
|
|||
// Setting support for Right To Left
|
|||
sheet1.IsRightToLeft = true; |
|||
|
|||
sheet1.CreateRow(0).CreateCell(0).SetCellValue("This is a Sample"); |
|||
|
|||
int x = 1; |
|||
|
|||
for(int i = 1; i <= 15; i++) |
|||
{ |
|||
IRow row = sheet1.CreateRow(i); |
|||
|
|||
for(int j = 0; j < 15; j++) |
|||
{ |
|||
row.CreateCell(j).SetCellValue(x++); |
|||
} |
|||
} |
|||
|
|||
FileStream sw = File.Create("test.xlsx"); |
|||
|
|||
workbook.Write(sw); |
|||
|
|||
sw.Close(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle("SetCellValuesInXlsx")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("SetCellValuesInXlsx")] |
|||
[assembly: AssemblyCopyright("Copyright © 2012")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("2a0c9f90-bd99-41d7-92a7-026ba2470418")] |
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
|||
// by using the '*' as shown below:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@ -0,0 +1,75 @@ |
|||
<?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>8.0.30703</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{4D81B9A9-14B6-4506-A7F4-59289886D822}</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>SetIsRightToLeftInXlsx</RootNamespace> |
|||
<AssemblyName>SetIsRightToLeftInXlsx</AssemblyName> |
|||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<TargetFrameworkProfile /> |
|||
</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="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\ICSharpCode.SharpZipLib.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI"> |
|||
<HintPath>..\..\..\solution\Lib\NPOI.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OOXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OOXML.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OpenXml4Net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OpenXml4Net.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="NPOI.OpenXmlFormats, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
|||
<SpecificVersion>False</SpecificVersion> |
|||
<HintPath>..\..\..\solution\Lib\.net4\NPOI.OpenXmlFormats.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="app.config" /> |
|||
</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> |
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> |
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> |
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> |
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> |
@ -0,0 +1,3 @@ |
|||
<?xml version="1.0"?> |
|||
<configuration> |
|||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue