Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

922444- Add Playground Button for Feature tour #149

Merged
merged 3 commits into from
Nov 20, 2024
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
Expand Up @@ -17,7 +17,7 @@ public static void Main(string[] args)
IWorksheet worksheet = workbook.Worksheets[0];

//Saving the workbook as stream
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CSV to Excel.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);

//Dispose streams
Expand Down
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.35417.141 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Custom Validation", "Custom Validation\Custom Validation.csproj", "{9DF53F0C-052E-4760-AF98-06C06305121D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9DF53F0C-052E-4760-AF98-06C06305121D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DF53F0C-052E-4760-AF98-06C06305121D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DF53F0C-052E-4760-AF98-06C06305121D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9DF53F0C-052E-4760-AF98-06C06305121D}.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,23 @@
<Project Sdk="Microsoft.NET.Sdk">

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

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

<ItemGroup>
<None Update="Data\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Output\*">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using Syncfusion.XlsIO;

namespace Custom_Validation
{
class Program
{
public static void Main(string[] args)
{
// Initialize Excel engine and application.
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

// Create a workbook and worksheet.
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet worksheet = workbook.Worksheets[0];

// Data validation for custom data.
IDataValidation validation = worksheet.Range["A3"].DataValidation;
worksheet.Range["A1"].Text = "Enter the value greater than 10 in A1";
worksheet.Range["A2"].Text = "Enter the text in A3";
worksheet.Range["A1"].AutofitColumns();
validation.AllowType = ExcelDataType.Formula;
validation.FirstFormula = "=A1>10";

// Show the error message.
validation.ShowErrorBox = true;
validation.ErrorBoxText = "A1 value is less than 10";
validation.ErrorBoxTitle = "ERROR";
validation.PromptBoxText = "Custom Data Validation";
validation.ShowPromptBox = true;

// Save the Excel document.
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CustomValidation.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);

//Dispose streams
outputStream.Dispose();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Saving the workbook as streams
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.csv"), FileMode.Create, FileAccess.ReadWrite);
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel to CSV.csv"), FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(outputStream, ",");

//Dispose streams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Open(inputStream);

//Save the workbook in CSV format with tab(\t) as delimiter
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.tsv"), FileMode.Create, FileAccess.ReadWrite);
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel to TSV.tsv"), FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(outputStream, "\t");
}
}
Expand Down
22 changes: 22 additions & 0 deletions Excel to Text/Excel to Text/.NET/Excel to Text/Excel to Text.sln
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.35417.141 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Excel to Text", "Excel to Text\Excel to Text.csproj", "{6657A512-E336-4097-8D5E-BF4A998D261A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6657A512-E336-4097-8D5E-BF4A998D261A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6657A512-E336-4097-8D5E-BF4A998D261A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6657A512-E336-4097-8D5E-BF4A998D261A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6657A512-E336-4097-8D5E-BF4A998D261A}.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,24 @@
<Project Sdk="Microsoft.NET.Sdk">

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

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

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

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

namespace Excel_to_Text
{
class Program
{
public static void Main(string[] args)
{
// Initialize Excel engine and application.
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

// Open an existing workbook.
FileStream inputStream = new FileStream(Path.GetFullPath("Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);

// Save the workbook in .txt format with space (" ") as the delimiter.
using FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel to Text.txt"), FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(outputStream, " ");
}
}
}
}
Binary file not shown.
Binary file not shown.
Binary file added Feature Tour/Chart/.NET/Chart/Chart.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions Feature Tour/Excel to CSV/.NET/Excel to CSV/Excel to CSV.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
document,document,document,document,document,document,document,document,document,document,document,document,document
20 changes: 20 additions & 0 deletions Feature Tour/Excel to CSV/.NET/Excel to CSV/Excel to TSV.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
20 changes: 20 additions & 0 deletions Feature Tour/Excel to CSV/.NET/Excel to CSV/Excel to Text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
document document document document document document document document document document document document document
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading