Skip to content

Commit 7d1cdeb

Browse files
Added playground buttons
1 parent 70dd147 commit 7d1cdeb

File tree

118 files changed

+396
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+396
-65
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Find-and-Replace/Replace-all-OLE-objects-with-text/.NET/Replace-all-OLE-objects-with-text/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Syncfusion.DocIO;
33

44
//Open the file as a Stream.
5-
using (FileStream docStream = new FileStream("../../../Data/Template.docx", FileMode.Open, FileAccess.Read))
5+
using (FileStream docStream = new FileStream("Data/Template.docx", FileMode.Open, FileAccess.Read))
66
{
77
//Load the file stream into a Word document.
88
using (WordDocument document = new WordDocument(docStream, FormatType.Docx))
@@ -17,7 +17,7 @@
1717
ReplaceOLEObjectsWithPlaceHolder(ole, "Embedded file was here");
1818
}
1919
//Save a Word document to the MemoryStream.
20-
FileStream outputStream = new FileStream(@"../../../Data/Output.docx", FileMode.OpenOrCreate);
20+
FileStream outputStream = new FileStream(@"Output/Output.docx", FileMode.OpenOrCreate);
2121
document.Save(outputStream, FormatType.Docx);
2222
//Closes the Word document
2323
document.Close();

Find-and-Replace/Replace-all-OLE-objects-with-text/.NET/Replace-all-OLE-objects-with-text/Replace-all-OLE-objects-with-text.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@
1212
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<None Update="Data\Template.docx">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Output\.gitkeep">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
23+
1524
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Find-and-Replace/Replace-line-break-with-paragraph-mark/.NET/Replace-line-break-with-paragraph-mark/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ class Program
88
{
99
static void Main(string[] args)
1010
{
11-
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"../../../Data/Input.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
11+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Input.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
1212
{
1313
//Open an existing Word document.
1414
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx))
1515
{
1616
//Replace line break with paragraph mark in the Word document.
1717
ReplaceLineBreakWithPara(document);
1818
//Create file stream.
19-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Sample.docx"), FileMode.Create, FileAccess.ReadWrite))
19+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Sample.docx"), FileMode.Create, FileAccess.ReadWrite))
2020
{
2121
//Save the Word document to file stream.
2222
document.Save(outputFileStream, FormatType.Docx);

Find-and-Replace/Replace-line-break-with-paragraph-mark/.NET/Replace-line-break-with-paragraph-mark/Replace-line-break-with-paragraph-mark.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Data\Input.docx">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
<None Update="Output\.gitkeep">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
</ItemGroup>
21+
1322
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Find-and-Replace/Replace-misspelled-word/.NET/Replace-misspelled-word/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ class Program
99
{
1010
static void Main(string[] args)
1111
{
12-
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"../../../Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
12+
using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
1313
{
1414
//Opens an existing Word document.
1515
using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Docx))
1616
{
1717
//Finds all occurrences of a misspelled word and replaces with properly spelled word.
1818
document.Replace("Cyles", "Cycles", true, true);
1919
//Creates file stream.
20-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
20+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
2121
{
2222
//Saves the Word document to file stream.
2323
document.Save(outputFileStream, FormatType.Docx);

Find-and-Replace/Replace-misspelled-word/.NET/Replace-misspelled-word/Replace-misspelled-word.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Data\Template.docx">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
<None Update="Output\.gitkeep">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
</ItemGroup>
21+
1322
</Project>

0 commit comments

Comments
 (0)