Skip to content

Commit 4f04b05

Browse files
994917-ExcelToPdfPerformanceSamples
1 parent 71b4c42 commit 4f04b05

File tree

25 files changed

+291
-0
lines changed

25 files changed

+291
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="Boolean Data Type/Boolean Data Type.csproj" />
3+
</Solution>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<RootNamespace>Boolean_Data_Type</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.XlsIORenderer.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
16+
<ItemGroup>
17+
<None Update="Output\*">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
<None Update="Data\*">
21+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
22+
</None>
23+
</ItemGroup>
24+
25+
</Project>

Performance Metrics/Excel to PDF/Boolean Data Type/.NET/Boolean Data Type/Boolean Data Type/Output/.gitkeep

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Syncfusion.XlsIO;
2+
using Syncfusion.XlsIORenderer;
3+
using Syncfusion.Pdf;
4+
using System.IO;
5+
6+
namespace Boolean_Data_Type
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
using (ExcelEngine excelEngine = new ExcelEngine())
13+
{
14+
IApplication application = excelEngine.Excel;
15+
application.DefaultVersion = ExcelVersion.Xlsx;
16+
17+
//Load existing Excel file
18+
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
19+
20+
//Convert to PDF
21+
XlsIORenderer renderer = new XlsIORenderer();
22+
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
23+
24+
#region Save
25+
//Saving the workbook
26+
pdfDocument.Save(Path.GetFullPath(@"Output/Sample.pdf"));
27+
#endregion
28+
}
29+
}
30+
}
31+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="DateTime Data Type/DateTime Data Type.csproj" />
3+
</Solution>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net10.0</TargetFramework>
6+
<RootNamespace>DateTime_Data_Type</RootNamespace>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<Nullable>enable</Nullable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.XlsIORenderer.Net.Core" Version="*" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<None Update="Output\*">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Data\*">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
23+
24+
</Project>

Performance Metrics/Excel to PDF/DateTime Data Type/.NET/DateTime Data Type/DateTime Data Type/Output/.gitkeep

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Syncfusion.XlsIO;
2+
using Syncfusion.XlsIORenderer;
3+
using Syncfusion.Pdf;
4+
using System.IO;
5+
6+
namespace DateTime_Data_Type
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
using (ExcelEngine excelEngine = new ExcelEngine())
13+
{
14+
IApplication application = excelEngine.Excel;
15+
application.DefaultVersion = ExcelVersion.Xlsx;
16+
17+
//Load existing Excel file
18+
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
19+
20+
//Convert to PDF
21+
XlsIORenderer renderer = new XlsIORenderer();
22+
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
23+
24+
#region Save
25+
//Saving the workbook
26+
pdfDocument.Save(Path.GetFullPath(@"Output/Sample.pdf"));
27+
#endregion
28+
}
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)