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,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35506.116 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "All Worksheet Names", "All Worksheet Names\All Worksheet Names.csproj", "{57ADBD15-12EB-458B-9AAC-BFA5C466C637}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{57ADBD15-12EB-458B-9AAC-BFA5C466C637}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{57ADBD15-12EB-458B-9AAC-BFA5C466C637}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57ADBD15-12EB-458B-9AAC-BFA5C466C637}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57ADBD15-12EB-458B-9AAC-BFA5C466C637}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>All_Worksheet_Names</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

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

</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO.Implementation.Collections;

namespace All_Worksheet_Names
{
class Program
{
static void Main(string[] args)
{
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print all worksheet names
foreach (IWorksheet worksheet in worksheets)
{
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();
}
}
}
}

41 changes: 41 additions & 0 deletions FAQ/Worksheet Names/.NET/All Worksheet Names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Retrieve All Worksheet Names

Step 1: Create a New C# Console Application Project.

Step 2: Name the Project.

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).

Step 4: Include the following namespaces in the **Program.cs** file.

```csharp
using System;
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO.Implementation.Collections;
```

Step 5: Include the below code snippet in **Program.cs** to retrieve all worksheet names.

```csharp
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print all worksheet names
foreach (IWorksheet worksheet in worksheets)
{
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35506.116 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hidden Worksheet Names", "Hidden Worksheet Names\Hidden Worksheet Names.csproj", "{CEC54C9C-8AFF-4F98-8FC6-0FEF7E0AFE5A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CEC54C9C-8AFF-4F98-8FC6-0FEF7E0AFE5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEC54C9C-8AFF-4F98-8FC6-0FEF7E0AFE5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEC54C9C-8AFF-4F98-8FC6-0FEF7E0AFE5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEC54C9C-8AFF-4F98-8FC6-0FEF7E0AFE5A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Hidden_Worksheet_Names</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

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

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

namespace Hidden_Worksheet_Names
{
class Program
{
static void Main(string[] args)
{
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print hidden worksheet names
foreach (IWorksheet worksheet in worksheets)
{
if (worksheet.Visibility == WorksheetVisibility.Hidden)
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();

}
}
}
}
43 changes: 43 additions & 0 deletions FAQ/Worksheet Names/.NET/Hidden Worksheet Names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Retrieve Hidden Worksheet Names

Step 1: Create a New C# Console Application Project.

Step 2: Name the Project.

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).

Step 4: Include the following namespaces in the **Program.cs** file.

```csharp
using System;
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO.Implementation.Collections;
```

Step 5: Include the below code snippet in **Program.cs** to retrieve hidden worksheet names.

```csharp
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print hidden worksheet names
foreach (IWorksheet worksheet in worksheets)
{
if (worksheet.Visibility == WorksheetVisibility.Hidden)
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();

}
```
42 changes: 42 additions & 0 deletions FAQ/Worksheet Names/.NET/Visible Worksheet Names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Retrieve Visible Worksheet Names

Step 1: Create a New C# Console Application Project.

Step 2: Name the Project.

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).

Step 4: Include the following namespaces in the **Program.cs** file.

```csharp
using System;
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO.Implementation.Collections;
```

Step 5: Include the below code snippet in **Program.cs** to retrieve visible worksheet names.

```csharp
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print visible worksheet names
foreach (IWorksheet worksheet in worksheets)
{
if (worksheet.Visibility == WorksheetVisibility.Visible)
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();

}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35506.116 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Visible Worksheet Names", "Visible Worksheet Names\Visible Worksheet Names.csproj", "{8A930791-C7F9-4583-AA7A-C7EBDB93A68F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8A930791-C7F9-4583-AA7A-C7EBDB93A68F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A930791-C7F9-4583-AA7A-C7EBDB93A68F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A930791-C7F9-4583-AA7A-C7EBDB93A68F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A930791-C7F9-4583-AA7A-C7EBDB93A68F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO.Implementation.Collections;

namespace Visible_Worksheet_Names
{
class Program
{
static void Main(string[] args)
{
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;

//Print visible worksheet names
foreach (IWorksheet worksheet in worksheets)
{
if (worksheet.Visibility == WorksheetVisibility.Visible)
Console.WriteLine(worksheet.Name);
}

//Dispose streams
inputStream.Dispose();

}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Visible_Worksheet_Names</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

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

</Project>