Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0f5cd35
990137-SecurityUG
KarthikaSF4773 Nov 3, 2025
a31a8db
990137-MacrosUG
KarthikaSF4773 Nov 3, 2025
aa06c8a
990137-CustomXmlSupport
KarthikaSF4773 Nov 3, 2025
02ab04f
990137-FAQStreamChangesUG
KarthikaSF4773 Nov 3, 2025
6124a85
990137-FAQStreamChangesUG
KarthikaSF4773 Nov 4, 2025
5766e71
Deleted duplicate file
KarthikaSF4773 Nov 4, 2025
5e48fbc
990137-ExcelToPdfUG
KarthikaSF4773 Nov 4, 2025
e3bf024
990137-ExcelToPdfUG
KarthikaSF4773 Nov 5, 2025
a9cc16c
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-FAQStreamChangesUG
KarthikaSF4773 Nov 6, 2025
f9d40f1
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-ExcelToPdfUG
KarthikaSF4773 Nov 6, 2025
aaddfa7
990137-FAQStreamChangesUG
KarthikaSF4773 Nov 6, 2025
babb090
990137-ExcelToPdfUG
KarthikaSF4773 Nov 6, 2025
d558461
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-ExcelToPdfUG
Mohan2401 Nov 15, 2025
841da5b
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-SecurityUG
Mohan2401 Nov 15, 2025
89ac53a
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-MacrosUG
Mohan2401 Nov 15, 2025
bba0e0a
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-SecurityUG
Mohan2401 Nov 15, 2025
44c41e9
Merge pull request #1699 from syncfusion-content/990137-SecurityUG
Mohan2401 Nov 16, 2025
1bfa0c7
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-ExcelToPdfUG
Mohan2401 Nov 16, 2025
d7378e4
Merge pull request #1717 from syncfusion-content/990137-ExcelToPdfUG
Mohan2401 Nov 16, 2025
ef6fd77
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-FAQStreamChangesUG
Mohan2401 Nov 16, 2025
c388db2
Merge pull request #1710 from syncfusion-content/990137-FAQStreamChan…
Mohan2401 Nov 16, 2025
d886575
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-CustomXmlSupport
Mohan2401 Nov 16, 2025
6fc32c7
Merge pull request #1704 from syncfusion-content/990137-MacrosUG
Mohan2401 Nov 16, 2025
5c45129
Merge branch 'hotfix/hotfix-v31.2.2' into 990137-CustomXmlSupport
Mohan2401 Nov 16, 2025
f1145d1
Merge pull request #1706 from syncfusion-content/990137-CustomXmlSupport
Mohan2401 Nov 16, 2025
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 @@ -25,8 +25,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
Expand All @@ -36,13 +35,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/WorkbookToPDF.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/WorkbookToPDF.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -102,8 +96,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Initialize XlsIO renderer.
Expand All @@ -114,13 +107,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/WorksheetToPDF.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/WorksheetToPDF.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -174,8 +162,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
Expand All @@ -187,20 +174,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(sheet.Name +".pdf", FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(sheet.Name + ".pdf");
#endregion

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

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo = new System.Diagnostics.ProcessStartInfo(sheet.Name + ".pdf")
{
UseShellExecute = true
};
process.Start();
}
}
{% endhighlight %}
Expand Down Expand Up @@ -262,8 +237,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

IChart chart = worksheet.Charts[0];
Expand All @@ -276,13 +250,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/ChartToPDF.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/ChartToPDF.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -347,8 +316,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set print location to comments
Expand All @@ -362,13 +330,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CommentsInPlaceToPDF.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/CommentsInPlaceToPDF.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -440,8 +403,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set print location to comments
Expand All @@ -455,13 +417,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CommentsToPDFAtEnd.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/CommentsToPDFAtEnd.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -534,8 +491,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set print location to comments
Expand All @@ -549,13 +505,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/NoCommentsInPDF.pdf"), FileMode.Create, FileAccess.Write);
pdfDocument.Save(outputStream);
pdfDocument.Save(Path.GetFullPath("Output/NoCommentsInPDF.pdf"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -632,8 +583,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream("CommentsTemplate.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("CommentsTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];

//Add threaded comment
Expand All @@ -651,9 +601,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())

//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(worksheet);
Stream stream = new FileStream("ExcelComments.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
stream.Dispose();
pdfDocument.Save("ExcelComments.pdf");
}
{% endhighlight %}

Expand Down Expand Up @@ -761,17 +709,12 @@ namespace FontSubstitution
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();

FileStream excelStream = new FileStream("Template.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(excelStream);
IWorkbook workbook = application.Workbooks.Open("Template.xlsx");

//Convert Excel document with charts into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

Stream stream = new FileStream("ExcelToPDF.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);

excelStream.Dispose();
stream.Dispose();
pdfDocument.Save("ExcelToPDF.pdf");
}
}

Expand Down Expand Up @@ -1207,8 +1150,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
Expand All @@ -1222,13 +1164,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Save the converted PDF document to stream.
FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
//Save the converted PDF document
pdfDocument.Save("Sample.pdf");

//Close and Dispose
workbook.Close();
stream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -1288,8 +1228,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
Expand All @@ -1312,13 +1251,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Save the converted PDF document to stream.
FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
//Save the converted PDF document
pdfDocument.Save("Sample.pdf");

//Close and Dispose
workbook.Close();
stream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -1398,8 +1335,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
Expand All @@ -1423,12 +1359,10 @@ using (ExcelEngine excelEngine = new ExcelEngine())
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Excel to PDF
Stream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
pdfDocument.Save("Sample.pdf");

//Close and Dispose
workbook.Close();
stream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -1506,8 +1440,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));

//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
Expand All @@ -1529,13 +1462,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);

//Save the PDF document to stream
FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
pdfDocument.Save(stream);
//Save the PDF document
pdfDocument.Save("Sample.pdf");

//Close and Dispose
workbook.Close();
stream.Dispose();
}
{% endhighlight %}

Expand Down
Loading