Skip to content

Commit 28819c7

Browse files
Merge branch 'hotfix/hotfix-v31.2.12' into SEO-211225-Document-Processing-word-conversions-word-to-pdf-net-
2 parents ddc8c3b + 527f463 commit 28819c7

25 files changed

+358
-36
lines changed

Document-Processing-toc.html

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5868,7 +5868,7 @@
58685868
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-auto-adjust-chart-axis-minimum-and-maximum-values">Does XlsIO auto-adjust chart axis minimum and maximum values?</a>
58695869
</li>
58705870
<li>
5871-
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-prefix-pivot-table-calculated-field-headers-with-sum-of">Does XlsIO prefix PivotTable calculated field headers with "Sum of"?</a>
5871+
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-prefix-pivot-table-calculated-field-headers-with-sum-of">Does XlsIO prefix PivotTable calculated field headers with Sum of?</a>
58725872
</li>
58735873
<li>
58745874
<a href="/document-processing/excel/excel-library/net/faqs/can-pivot-tables-share-calculate-field-names">Can PivotTables share calculated field names?</a>
@@ -5879,6 +5879,18 @@
58795879
<li>
58805880
<a href="/document-processing/excel/excel-library/net/faqs/what-is-the-unit-of-row-height-and-column-width-in-Excel">What is the unit of row height and column width in Excel?</a>
58815881
</li>
5882+
<li>
5883+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-apply-the-formatting-for-a-particular-column-while-importing-data-from-collection-objects">How to apply formatting to a specific column while importing data?</a>
5884+
</li>
5885+
<li>
5886+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-align-the-image-inside-the-cell">How to align a picture inside a cell in an Excel worksheet?</a>
5887+
</li>
5888+
<li>
5889+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-resolve-the-cannot-open-Pivot-table-source-file-error">How to resolve the cannot open pivot table source file error?</a>
5890+
</li>
5891+
<li>
5892+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-extract-embedded-OLE-files-from-an-Excel-workbook-as-streams">How to extract embedded OLE files from an Excel workbook as streams?</a>
5893+
</li>
58825894
</ul>
58835895
</li>
58845896
</ul>
@@ -5995,8 +6007,8 @@
59956007
<a href="/document-processing/excel/conversions/excel-to-pdf/net/Excel-to-PDF-Converter-Settings">Excel to PDF Converter Settings</a>
59966008
</li>
59976009
<li>
5998-
                 <a href="/document-processing/excel/conversions/excel-to-pdf/net/Performance-Metrics">Performance Metrics</a>
5999-
               </li>
6010+
<a href="/document-processing/excel/conversions/excel-to-pdf/net/Performance-Metrics">Performance Metrics</a>
6011+
</li>
60006012
<li>
60016013
<a href="/document-processing/excel/conversions/excel-to-pdf/net/faq">FAQ</a>
60026014
<ul>
@@ -7027,7 +7039,7 @@
70277039
<ul>
70287040
<li>
70297041
Weekly Nuget Release
7030-
<ul>
7042+
<ul><li><a href="/document-processing/release-notes/v31.2.16">v31.2.16</a></li>
70317043
<li><a href="/document-processing/release-notes/v31.2.15">v31.2.15</a></li>
70327044
<li><a href="/document-processing/release-notes/v31.2.10">v31.2.10</a></li>
70337045
<li><a href="/document-processing/release-notes/v31.2.5">v31.2.5</a></li>

Document-Processing/Excel/Excel-Library/NET/Working-with-Conditional-Formatting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ documentation: UG
1010

1111
Conditional formatting allows to format the contents of a cell dynamically. This can be defined and applied in XlsIO through the [IConditionalFormat](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IConditionalFormat.html) interface.
1212

13+
To quickly learn How to Apply Conditional Formatting in Excel Using .NET Excel Library, check out this video:
14+
{% youtube "https://www.youtube.com/watch?v=S1lkNLV70hc" %}
15+
1316
## Create a Conditional Format 
1417

1518
The [IConditionalFormats](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IConditionalFormats.html) represents a collection of conditional formats for a single [IRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IRange.html). One or more conditional formats can be added to the range as follows.

Document-Processing/Excel/Excel-Library/NET/Working-with-Formulas.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ keywords: c#, vb.net, excel, read excel, edit excel, edit excel cell, excel form
1010

1111
[Formulas](https://support.microsoft.com/en-gb/office/overview-of-formulas-in-excel-ecfdc708-9162-49e8-b993-c311f47ca173?redirectsourcepath=%252fen-us%252farticle%252foverview-of-formulas-7abfda78-eff3-4cc6-b4a7-6350d512d2dc) are entries in Excel that have equations, by which values are calculated. A typical formula might contain cell references, constants, and even functions.
1212

13+
To quickly learn How to Work with Formulas in an Excel Using the .NET Excel Library, check out this video:
14+
{% youtube "https://www.youtube.com/watch?v=SjHcYYvVSF4" %}
15+
1316
## Enable and Disable Calculation
1417

1518
To perform calculation in an Excel workbook, it is recommended to invoke [EnableSheetCalculations](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_EnableSheetCalculations) method of [IWorksheet](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html). Enabling this method will initialize [CalcEngine](https://help.syncfusion.com/document-processing/excel/excel-library/net/working-with-formulas#calculation-engine) objects and retrieves calculated values of formulas in a worksheet.

Document-Processing/Excel/Excel-Library/NET/create-read-edit-excel-files-in-aws-lambda.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
222222
worksheet.Range["A9:A14"].RowHeight = 15;
223223
worksheet.Range["A15:A23"].RowHeight = 18;
224224

225-
//Saving the Excel to the MemoryStream
226-
MemoryStream stream = new MemoryStream();
225+
MemoryStream stream = new MemoryStream();
227226
workbook.SaveAs(stream);
228-
229-
//Set the position as '0'.
230-
stream.Position = 0;
231-
232-
//Download the Excel file in the browser
233-
FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/excel");
234-
fileStreamResult.FileDownloadName = "Output.xlsx";
235-
return fileStreamResult;
227+
return Convert.ToBase64String(stream.ToArray());
236228
}
237229

238230
{% endhighlight %}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Align a picture inside a cell in an Excel worksheet | Syncfusion
3+
description: Learn how to align an image precisely within a worksheet cell using the Syncfusion .NET Excel (XlsIO) library, including positioning, fitting to the cell.
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to align a picture inside a cell in an Excel worksheet?
10+
11+
Image can be aligned in the cell as required using the **TopRowOffset** and **LeftColumnOffset** properties of **ShapeImpl** instance. The following example shows how to align a picture inside a worksheet cell using the Syncfusion .NET Excel (XlsIO) library.
12+
13+
{% tabs %}
14+
{% highlight c# tabtitle="C# [Cross-platform]" %}
15+
using (ExcelEngine excelEngine = new ExcelEngine())
16+
{
17+
IApplication application = excelEngine.Excel;
18+
application.DefaultVersion = ExcelVersion.Xlsx;
19+
IWorkbook workbook = application.Workbooks.Create(1);
20+
IWorksheet worksheet = workbook.Worksheets[0];
21+
22+
int row = 2;
23+
int column = 3;
24+
25+
//Adding a picture
26+
FileStream imageStream = new FileStream("../../../Data/Image.png", FileMode.Open, FileAccess.Read);
27+
IPictureShape shape = worksheet.Pictures.AddPicture(row, column, imageStream);
28+
29+
//Insert the image into the cell
30+
(shape as ShapeImpl).Height = worksheet.GetRowHeightInPixels(row);
31+
(shape as ShapeImpl).Width = worksheet.GetColumnWidthInPixels(column);
32+
33+
//Algin the image inside the cell
34+
(shape as ShapeImpl).TopRowOffset = 50;
35+
(shape as ShapeImpl).LeftColumnOffset = 50;
36+
37+
#region Save
38+
//Saving the workbook
39+
workbook.SaveAs("../../../Output/Picture.xlsx");
40+
#endregion
41+
42+
//Dispose streams
43+
imageStream.Dispose();
44+
}
45+
{% endhighlight %}
46+
47+
{% highlight c# tabtitle="C# [Windows-specific]" %}
48+
using (ExcelEngine excelEngine = new ExcelEngine())
49+
{
50+
IApplication application = excelEngine.Excel;
51+
application.DefaultVersion = ExcelVersion.Xlsx;
52+
IWorkbook workbook = application.Workbooks.Create(1);
53+
IWorksheet worksheet = workbook.Worksheets[0];
54+
55+
int row = 2;
56+
int column = 3;
57+
58+
//Adding a picture
59+
string image = "../../Data/Image.png";
60+
IPictureShape shape = worksheet.Pictures.AddPicture(row, column, image);
61+
62+
// Insert the image into the cell
63+
(shape as ShapeImpl).Height = worksheet.GetRowHeightInPixels(row);
64+
(shape as ShapeImpl).Width = worksheet.GetColumnWidthInPixels(column);
65+
66+
//Algin the image inside the cell
67+
(shape as ShapeImpl).TopRowOffset = 50;
68+
(shape as ShapeImpl).LeftColumnOffset = 50;
69+
70+
#region Save
71+
//Saving the workbook
72+
workbook.SaveAs("../../Output/Picture.xlsx");
73+
#endregion
74+
}
75+
{% endhighlight %}
76+
77+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
78+
Using excelEngine As New ExcelEngine()
79+
Dim application As IApplication = excelEngine.Excel
80+
application.DefaultVersion = ExcelVersion.Xlsx
81+
82+
Dim workbook As IWorkbook = application.Workbooks.Create(1)
83+
Dim worksheet As IWorksheet = workbook.Worksheets(0)
84+
85+
Dim row As Integer = 2
86+
Dim column As Integer = 3
87+
88+
' Adding a picture
89+
Dim image As String = "../../Data/Image.png"
90+
Dim shape As IPictureShape = worksheet.Pictures.AddPicture(row, column, image)
91+
92+
' Insert the image into the cell
93+
Dim impl As ShapeImpl = CType(shape, ShapeImpl)
94+
impl.Height = worksheet.GetRowHeightInPixels(row)
95+
impl.Width = worksheet.GetColumnWidthInPixels(column)
96+
97+
' Align the image inside the cell
98+
impl.TopRowOffset = 50
99+
impl.LeftColumnOffset = 50
100+
101+
' Save
102+
workbook.SaveAs("../../Output/Picture.xlsx")
103+
End Using
104+
{% endhighlight %}
105+
{% endtabs %}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Copy used range in Excel | Syncfusion
3+
description: Learn how to copy the used range from one Excel workbook to another using the Syncfusion .NET Excel library (XlsIO).
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to copy the used range from one Excel workbook to another?
10+
11+
The [UsedRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_UsedRange) of [IWorksheet](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html) returns the contiguous range that contains data in a worksheet. By default, Excel also considers cells that have only formatting applied as part of the used range.
12+
13+
The following code examples show how to copy the used range from a source workbook to a destination workbook in C# (cross-platform and Windows-specific) and VB.NET.
14+
15+
{% tabs %}
16+
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/FAQ/Copy%20Used%20Range/.NET/CopyUsedRange/CopyUsedRange/Program.cs,180" %}
17+
using (ExcelEngine excelEngine = new ExcelEngine())
18+
{
19+
IApplication application = excelEngine.Excel;
20+
application.DefaultVersion = ExcelVersion.Xlsx;
21+
IWorkbook sourceWorkbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Source.xlsx"));
22+
IWorkbook destinationWorkbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Destination.xlsx"));
23+
24+
IWorksheet sourceWorksheet = sourceWorkbook.Worksheets["Sheet1"];
25+
IWorksheet destinationWorksheet = destinationWorkbook.Worksheets["Sheet1"];
26+
27+
//Get the actual used range from source sheet
28+
IRange sourceRange = sourceWorksheet.UsedRange;
29+
30+
//Copy the entire used range from source sheet to destination sheet
31+
sourceRange.CopyTo(destinationWorksheet.Range[sourceRange.Row, sourceRange.Column]);
32+
33+
//Save the destination workbook
34+
destinationWorkbook.SaveAs(Path.GetFullPath(@"Output/Output.xlsx"));
35+
}
36+
{% endhighlight %}
37+
38+
{% highlight c# tabtitle="C# [Windows-specific]" %}
39+
using (ExcelEngine excelEngine = new ExcelEngine())
40+
{
41+
IApplication application = excelEngine.Excel;
42+
application.DefaultVersion = ExcelVersion.Xlsx;
43+
IWorkbook sourceWorkbook = application.Workbooks.Open("Source.xlsx");
44+
IWorkbook destinationWorkbook = application.Workbooks.Open("Destination.xlsx");
45+
46+
IWorksheet sourceWorksheet = sourceWorkbook.Worksheets["Sheet1"];
47+
IWorksheet destinationWorksheet = destinationWorkbook.Worksheets["Sheet1"];
48+
49+
//Get the actual used range from source sheet
50+
IRange sourceRange = sourceWorksheet.UsedRange;
51+
52+
//Copy the entire used range from source sheet to destination sheet
53+
sourceRange.CopyTo(destinationWorksheet.Range[sourceRange.Row, sourceRange.Column]);
54+
55+
//Save the destination workbook
56+
destinationWorkbook.SaveAs("Output.xlsx");
57+
}
58+
{% endhighlight %}
59+
60+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
61+
Using excelEngine As New ExcelEngine()
62+
Dim application As IApplication = excelEngine.Excel
63+
application.DefaultVersion = ExcelVersion.Xlsx
64+
Dim sourceWorkbook As IWorkbook = application.Workbooks.Open("Source.xlsx")
65+
Dim destinationWorkbook As IWorkbook = application.Workbooks.Open("Destination.xlsx")
66+
67+
Dim sourceWorksheet As IWorksheet = sourceWorkbook.Worksheets("Sheet1")
68+
Dim destinationWorksheet As IWorksheet = destinationWorkbook.Worksheets("Sheet1")
69+
70+
'Get the actual used range from source sheet
71+
Dim sourceRange As IRange = sourceWorksheet.UsedRange
72+
73+
'Copy the entire used range from source sheet to destination sheet
74+
sourceRange.CopyTo(destinationWorksheet.Range(sourceRange.Row, sourceRange.Column))
75+
76+
'Save the destination workbook
77+
destinationWorkbook.SaveAs("Output.xlsx")
78+
End Using
79+
{% endhighlight %}
80+
{% endtabs %}
81+
82+
A complete working example to copy the used range from a source workbook to a destination workbook using C# is present on <a href="https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/FAQ/Copy%20Used%20Range/.NET/CopyUsedRange">this GitHub page</a>.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Extract embedded OLE files from Excel as streams | Syncfusion
3+
description: This page shows how to extract embedded OLE objects from Excel as streams using the Syncfusion .NET Excel (XlsIO) library.
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to extract embedded OLE files from an Excel workbook as streams?
10+
11+
You can extract OLE objects in an Excel workbook as streams using XlsIO. The following example demonstrates how to retrieve embedded files from a worksheet.
12+
{% tabs %}
13+
{% highlight c# tabtitle="C# [Cross-platform]" %}
14+
using (ExcelEngine excelEngine = new ExcelEngine())
15+
{
16+
//Create worksheet
17+
IApplication application = excelEngine.Excel;
18+
application.DefaultVersion = ExcelVersion.Xlsx;
19+
IWorkbook workbook = application.Workbooks.Create(1);
20+
IWorksheet worksheet = workbook.Worksheets[0];
21+
22+
FileStream embedStream = new FileStream("../../../Sample.docx", FileMode.Open);
23+
FileStream imageStream = new FileStream("../../../wordIcon.jpg", FileMode.Open);
24+
25+
//Create image stream
26+
Image image = Image.FromStream(imageStream);
27+
28+
//Add ole object
29+
IOleObject oleObject = worksheet.OleObjects.Add(embedStream, image, OleObjectType.WordDocument);
30+
31+
// Get the OLE part stream.
32+
Image image1 = Image.FromStream(worksheet.OleObjects[0].GetEmbeddedOleStream());
33+
MemoryStream memory = new MemoryStream(image1.ImageData);
34+
35+
//Saving the workbook as stream
36+
FileStream stream = new FileStream("ExtractedFile.xlsx", FileMode.Create, FileAccess.Write);
37+
memory.CopyTo(stream);
38+
workbook.SaveAs(stream);
39+
stream.Dispose();
40+
}
41+
{% endhighlight %}
42+
43+
{% endtabs %}

Document-Processing/PDF/PDF-Library/NET/Working-with-Layers.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Layers, also known as Option Content refers to sections of content in a PDF docu
1212

1313
Essential<sup>&reg;</sup> PDF provides support to create, add and merge the layers into PDF document.
1414

15+
Check the following video to learn how to work with PDF layers using the .NET PDF Library.
16+
{% youtube "https://youtu.be/xvQ7yM0Pddk?si=T8guG9seZNX09pFb" %}
17+
1518
## Adding Layers in a PDF document
1619

1720
Essential<sup>&reg;</sup> PDF allows the users to create a layer in a PDF page using [PdfPageLayer](https://help.syncfusion.com/cr/document-processing/Syncfusion.Pdf.PdfPageLayer.html) class. The below code example illustrates how to add the multiple layers in a new PDF document.

Document-Processing/PDF/PDF-Viewer/maui/Getting-Started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,4 @@ Open the `MainPage.xaml` file and follow the steps below.
463463

464464
The **Getting Started** example project for the .NET MAUI PDF Viewer can be downloaded [here](https://github.com/SyncfusionExamples/maui-pdf-viewer-examples)
465465

466-
N> You can refer to our [.NET MAUI PDF Viewer](https://www.syncfusion.com/maui-controls/maui-pdf-viewer) feature tour page for its groundbreaking feature representations. You can also explore our [.NET MAUI PDF Viewer Example](https://github.com/syncfusion/maui-demos/tree/master/MAUI/PdfViewer) that shows you how to render the PDF Viewer in .NET MAUI.
466+
N> You can refer to our [.NET MAUI PDF Viewer](https://www.syncfusion.com/maui-controls/maui-pdf-viewer) feature tour page for its groundbreaking feature representations. You can also explore our [.NET MAUI PDF Viewer Example](https://github.com/syncfusion/pdf-viewer-sdk-net-maui-demos/tree/master/PdfViewer) that shows you how to render the PDF Viewer in .NET MAUI.

Document-Processing/PDF/PDF-Viewer/maui/Open-a-Document.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ The .NET MAUI PDF Viewer does not currently support annotations comparable to Xa
7979
N> * All the [LoadDocument](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_LoadDocument_System_IO_Stream_System_String_System_Nullable_Syncfusion_Maui_PdfViewer_FlattenOptions__) methods accept the flatten options parameter.
8080
N> * Refer to this [section](https://help.syncfusion.com/maui/pdf-viewer/migration#upcoming-features) for the upcoming annotation features in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html).
8181

82+
## Optimizing document loading on Android
83+
84+
When your application handles large images, complex graphics, or memory-intensive operations, the default heap size may not be sufficient, leading to performance issues or crashes. Enabling a larger heap allows the app to allocate more memory, ensuring smooth performance and preventing out-of-memory errors in such scenarios. You can enable this by adding the following highlighted attribute in your AndroidManifest.xml under the <application> tag.
85+
86+
{% tabs %}
87+
{% highlight xml hl_lines="4" %}
88+
<?xml version="1.0" encoding="utf-8"?>
89+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
90+
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round"
91+
android:largeHeap="true" ></application>
92+
...
93+
</manifest>
94+
{% endhighlight %}
95+
{% endtabs %}
96+
8297
## Check other PDF opening options
8398

8499
* [Open a document from local storage](https://help.syncfusion.com/maui/pdf-viewer/open-a-document-from-local-storage)

0 commit comments

Comments
 (0)