Skip to content

Commit aca6feb

Browse files
947645-AutofillExample
1 parent dd8bc3b commit aca6feb

File tree

19 files changed

+188
-184
lines changed

19 files changed

+188
-184
lines changed

Worksheet Features/Fill Series/.NET/DateTime FillSeries/DateTime FillSeries/Program.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

Worksheet Features/Fill Series/.NET/DateTime FillSeries/README.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

Worksheet Features/Fill Series/.NET/DateTime FillSeries/DateTime FillSeries.sln renamed to Worksheet Features/Fill Series/.NET/DateTimeFillSeries/DateTimeFillSeries.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.14.36127.28 d17.14
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DateTime FillSeries", "DateTime FillSeries\DateTime FillSeries.csproj", "{EA9A1164-D806-4836-AC67-CC2AF5816704}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DateTimeFillSeries", "DateTimeFillSeries\DateTimeFillSeries.csproj", "{346AE701-4612-43C5-AD9A-3E2789A1CD32}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.XlsIO.Portable_NET80", "..\..\..\..\..\xlsio\Portable\XlsIO.Portable\Src\Syncfusion.XlsIO.Portable_NET80.csproj", "{B1829367-CB57-24F6-0C45-DBCA10D321FF}"
99
EndProject
@@ -15,10 +15,10 @@ Global
1515
Release|Any CPU = Release|Any CPU
1616
EndGlobalSection
1717
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18-
{EA9A1164-D806-4836-AC67-CC2AF5816704}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19-
{EA9A1164-D806-4836-AC67-CC2AF5816704}.Debug|Any CPU.Build.0 = Debug|Any CPU
20-
{EA9A1164-D806-4836-AC67-CC2AF5816704}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{EA9A1164-D806-4836-AC67-CC2AF5816704}.Release|Any CPU.Build.0 = Release|Any CPU
18+
{346AE701-4612-43C5-AD9A-3E2789A1CD32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{346AE701-4612-43C5-AD9A-3E2789A1CD32}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{346AE701-4612-43C5-AD9A-3E2789A1CD32}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{346AE701-4612-43C5-AD9A-3E2789A1CD32}.Release|Any CPU.Build.0 = Release|Any CPU
2222
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2323
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
2424
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -32,6 +32,6 @@ Global
3232
HideSolutionNode = FALSE
3333
EndGlobalSection
3434
GlobalSection(ExtensibilityGlobals) = postSolution
35-
SolutionGuid = {FAD9B7EE-3BB0-4977-8762-A415698A72BB}
35+
SolutionGuid = {80FA51BF-09BC-42BE-8C5F-1A1D2108B0DE}
3636
EndGlobalSection
3737
EndGlobal
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6-
<RootNamespace>Number_FillSeries</RootNamespace>
76
<ImplicitUsings>enable</ImplicitUsings>
87
<Nullable>enable</Nullable>
98
</PropertyGroup>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Syncfusion.XlsIO;
2+
3+
namespace DateTimeFillSeries
4+
{
5+
class Program
6+
{
7+
public static void Main(string[] args)
8+
{
9+
using (ExcelEngine excelEngine = new ExcelEngine())
10+
{
11+
IApplication application = excelEngine.Excel;
12+
application.DefaultVersion = ExcelVersion.Xlsx;
13+
IWorkbook workbook = application.Workbooks.Create(1);
14+
IWorksheet worksheet = workbook.Worksheets[0];
15+
16+
//Assign datetime value to the cell
17+
worksheet["A1"].DateTime = new DateTime(2025, 1, 1);
18+
19+
//Define the range
20+
IRange range = worksheet["A1:A50"];
21+
22+
//Fill series using the years option
23+
range.FillSeries(ExcelSeriesBy.Columns, ExcelFillSeries.Years, 2, new DateTime(2100, 1, 1));
24+
25+
//Saving the workbook
26+
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
27+
workbook.SaveAs(outputStream);
28+
29+
//Dispose streams
30+
outputStream.Dispose();
31+
}
32+
}
33+
}
34+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# How to fill a date series in a worksheet?
2+
3+
Step 1: Create a new C# Console Application project.
4+
5+
Step 2: Name the project.
6+
7+
Step 3: Install the [Syncfusion.XlsIO.Net.Core](https://www.nuget.org/packages/Syncfusion.XlsIO.Net.Core) NuGet package as reference to your .NET Standard applications from [NuGet.org](https://www.nuget.org).
8+
9+
Step 4: Include the following namespaces in the **Program.cs** file.
10+
11+
```csharp
12+
using System;
13+
using System.IO;
14+
using Syncfusion.XlsIO;
15+
```
16+
17+
Step 5: Include the below code snippet in **Program.cs** to fill a date series in a worksheet.
18+
```csharp
19+
using (ExcelEngine excelEngine = new ExcelEngine())
20+
{
21+
IApplication application = excelEngine.Excel;
22+
application.DefaultVersion = ExcelVersion.Xlsx;
23+
IWorkbook workbook = application.Workbooks.Create(1);
24+
IWorksheet worksheet = workbook.Worksheets[0];
25+
26+
//Assign datetime value to the cell
27+
worksheet["A1"].DateTime = new DateTime(2025, 1, 1);
28+
29+
//Define the range
30+
IRange range = worksheet["A1:A50"];
31+
32+
//Fill series using the years option
33+
range.FillSeries(ExcelSeriesBy.Columns, ExcelFillSeries.Years, 2, new DateTime(2100, 1, 1));
34+
35+
//Saving the workbook
36+
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
37+
workbook.SaveAs(outputStream);
38+
39+
//Dispose streams
40+
outputStream.Dispose();
41+
}
42+
```

Worksheet Features/Fill Series/.NET/FillSeries by Enabling Trend/FillSeries by Enabling Trend/Program.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.14.36127.28 d17.14
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FillSeries by Enabling Trend", "FillSeries by Enabling Trend\FillSeries by Enabling Trend.csproj", "{B94BB8DF-E6D3-4F7B-B908-E8DDB53E9FF2}"
7-
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.XlsIO.Portable_NET80", "..\..\..\..\..\xlsio\Portable\XlsIO.Portable\Src\Syncfusion.XlsIO.Portable_NET80.csproj", "{B1829367-CB57-24F6-0C45-DBCA10D321FF}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FillSeriesByEnablingTrend", "FillSeriesByEnablingTrend\FillSeriesByEnablingTrend.csproj", "{9514937A-D01E-463C-99EE-58739CF69460}"
97
EndProject
108
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.Compression.Portable_NET80", "..\..\..\..\..\compression\Portable\Compression.Portable\Src\Syncfusion.Compression.Portable_NET80.csproj", "{652B9342-F913-C1BF-A30E-31072C9225F7}"
119
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.XlsIO.Portable_NET80", "..\..\..\..\..\xlsio\Portable\XlsIO.Portable\Src\Syncfusion.XlsIO.Portable_NET80.csproj", "{B1829367-CB57-24F6-0C45-DBCA10D321FF}"
11+
EndProject
1212
Global
1313
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1414
Debug|Any CPU = Debug|Any CPU
1515
Release|Any CPU = Release|Any CPU
1616
EndGlobalSection
1717
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18-
{B94BB8DF-E6D3-4F7B-B908-E8DDB53E9FF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19-
{B94BB8DF-E6D3-4F7B-B908-E8DDB53E9FF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
20-
{B94BB8DF-E6D3-4F7B-B908-E8DDB53E9FF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
21-
{B94BB8DF-E6D3-4F7B-B908-E8DDB53E9FF2}.Release|Any CPU.Build.0 = Release|Any CPU
22-
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23-
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
24-
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
25-
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Release|Any CPU.Build.0 = Release|Any CPU
18+
{9514937A-D01E-463C-99EE-58739CF69460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{9514937A-D01E-463C-99EE-58739CF69460}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{9514937A-D01E-463C-99EE-58739CF69460}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{9514937A-D01E-463C-99EE-58739CF69460}.Release|Any CPU.Build.0 = Release|Any CPU
2622
{652B9342-F913-C1BF-A30E-31072C9225F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2723
{652B9342-F913-C1BF-A30E-31072C9225F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
2824
{652B9342-F913-C1BF-A30E-31072C9225F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
2925
{652B9342-F913-C1BF-A30E-31072C9225F7}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{B1829367-CB57-24F6-0C45-DBCA10D321FF}.Release|Any CPU.Build.0 = Release|Any CPU
3030
EndGlobalSection
3131
GlobalSection(SolutionProperties) = preSolution
3232
HideSolutionNode = FALSE
3333
EndGlobalSection
3434
GlobalSection(ExtensibilityGlobals) = postSolution
35-
SolutionGuid = {45D78520-D413-42CC-B68D-09C8135BDEE5}
35+
SolutionGuid = {3292C768-1ED4-41AF-B4D0-966FE00D1E76}
3636
EndGlobalSection
3737
EndGlobal

Worksheet Features/Fill Series/.NET/DateTime FillSeries/DateTime FillSeries/DateTime FillSeries.csproj renamed to Worksheet Features/Fill Series/.NET/FillSeriesByEnablingTrend/FillSeriesByEnablingTrend/FillSeriesByEnablingTrend.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6-
<RootNamespace>DateTime_FillSeries</RootNamespace>
76
<ImplicitUsings>enable</ImplicitUsings>
87
<Nullable>enable</Nullable>
98
</PropertyGroup>

0 commit comments

Comments
 (0)