Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="Orientation/Orientation.csproj" />
</Solution>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="*" />
</ItemGroup>

<ItemGroup>
<None Update="Output\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Data\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System.IO;
using Syncfusion.XlsIO;

namespace Orientation
{
class Program
{
static void Main(string[] args)
{
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set the page orientation
worksheet.PageSetup.Orientation = ExcelPageOrientation.Landscape;

//Saving the workbook
workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
}
}
}
3 changes: 3 additions & 0 deletions Worksheet Features/PaperSize/.NET/PaperSize/PaperSize.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="PaperSize/PaperSize.csproj" />
</Solution>
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="*" />
</ItemGroup>

<ItemGroup>
<None Update="Output\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Data\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions Worksheet Features/PaperSize/.NET/PaperSize/PaperSize/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System.IO;
using Syncfusion.XlsIO;

namespace PaperSize
{
class Program
{
static void Main(string[] args)
{
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set the paper size to A4
worksheet.PageSetup.PaperSize = ExcelPaperSize.PaperA4;

//Saving the workbook
workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
}
}
}