Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In order to provide the feature PivotItem’s Absolute Positioning, Aspose.Cells for .NET 8.3.2 exposes a series of properties and helper methods as listed below.
Aspose.Cells for .NET 8.3.2 provides support for the Signature Line to mimic the MS Excel equivalent feature. This release of Aspose.Cells for .NET exposes the SignatureLine class and the Picture.SignatureLine property for this purpose.
The following sample code adds a Signature Line using the Picture.SignatureLine property to the workbook.
C#
//Create workbook object
Workbook workbook = new Workbook();
//Insert picture of your choice
int index = workbook.Worksheets[0].Pictures.Add(0, 0, "signature.jpg");
//Access picture and add signature line inside it
Picture pic = workbook.Worksheets[0].Pictures[index];
//Create signature line object
SignatureLine s = new SignatureLine();
s.Signer = "John Doe";
s.Title = "Development Lead";
s.Email = "john.doe@aspose.com";
//Assign the signature line object to Picture.SignatureLine property
pic.SignatureLine = s;
With the release of v8.3.2, the Aspose.Cells API provides the Chart.HasAxis(AxisType axisType, bool isPrimary) method to determine if the chart has a particular axis.
The following sample code demonstrates the use of Chart.HasAxis method to determine if the sample chart has Primary, Secondary, and Value axes.
C#
//Create workbook object
Workbook workbook = new Workbook("source.xlsx");
//Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
//Access the chart
Chart chart = worksheet.Charts[0];
//Determine which axis exists in chart
bool ret = chart.HasAxis(AxisType.Category, true);
Console.WriteLine("Has Primary Category Axis: " + ret);
ret = chart.HasAxis(AxisType.Category, false);
Console.WriteLine("Has Secondary Category Axis: " + ret);
ret = chart.HasAxis(AxisType.Value, true);
Console.WriteLine("Has Primary Value Axis: " + ret);
ret = chart.HasAxis(AxisType.Value, false);
Console.WriteLine("Has Secondary Value Axis: " + ret);
The method WorkbookSettings.CheckWriteProtectedPassword enables developers to check if a given password to modify the spreadsheet is correct.
C#
//Specify password to open inside the load options
LoadOptions opts = new LoadOptions();
opts.Password = "1234";
//Open the source Excel file with load options
Workbook workbook = new Workbook("Book1.xlsx", opts);
//Check if 567 is the password to modify
bool ret = workbook.CheckWriteProtectedPassword("567");
Console.WriteLine("Is 567 the correct password to modify: " + ret);
Aspose.Cells for .NET 8.3.2 provides the WorkbookRender.ToPrinter(string printerName, int printPageIndex, int printPageCount) and SheetRender.ToPrinter(string printerName, int printPageIndex, int printPageCount) methods to print a range of pages of a workbook and worksheet respectively.
The following sample code illustrates the use of these methods to print pages 2‑5 of the workbook and worksheet.
C#
//Create workbook from source Excel file
Workbook workbook = new Workbook("source.xlsx");
//Print the workbook specifying the range of pages
//Here we are printing pages 2-5
WorkbookRender wr = new WorkbookRender(workbook, new ImageOrPrintOptions());
wr.ToPrinter(printerName, 1, 4);
//Access first worksheet
Worksheet worksheet = workbook.Worksheets[0];
//Print the worksheet specifying the range of pages
//Here we are printing pages 2-5
SheetRender sr = new SheetRender(worksheet, new ImageOrPrintOptions());
sr.ToPrinter(printerName, 1, 4);
The newly added method Worksheet.RefreshPivotTables allows you to refresh all the pivot tables in a given spreadsheet with a single call.
C#
worksheet.RefreshPivotTables();
Aspose.Cells for .NET API exposes the Workbook.GetNamedStyle method that accepts a string parameter and retrieves the Style object based on the parameter passed.
Aspose.Cells for .NET API makes it possible to import two‑dimensional arrays to spreadsheet cells by exposing the Cells.ImportTwoDimensionArray(object[,], object[,], int, int, TxtLoadOptions) method. This method imports a two‑dimensional array of data into a worksheet with flexible options defined in TxtLoadOptions.
Aspose.Cells for .NET 8.3.2 exposes the OnePagePerSheet, PageIndex & PageCount properties for the XpsSaveOptions class. The user can fit all contents of a spreadsheet on a single page of XPS using the OnePagePerSheet property and/or retrieve the number of pages to be printed using the PageCount property. The PageIndex property gets/sets the 0‑based index of the first page to be saved.
Aspose.Cells for .NET 8.3.2 introduces NumberDecimalSeparator & NumberGroupSeparator properties that can get/set the custom separators used for formatting and parsing numeric values in spreadsheets.
The following sample code illustrates how to specify the custom separators using Aspose.Cells API. The code specifies the custom decimal and group separators as a dot and a space, respectively.
C#
Workbook workbook = new Workbook();
//Specify custom separators
workbook.Settings.NumberDecimalSeparator = '.';
workbook.Settings.NumberGroupSeparator = ' ';
Aspose.Cells for .NET 8.3.2 exposes the PdfSaveOptions.IsFontSubstitutionCharGranularity property to overcome the problem where some Unicode characters cannot be displayed using a specific font family. When this property is set to true, only the font of the specific character that is not displayable will be changed to a displayable font, and the rest of the word or sentence will remain in the original font.
C#
//Save to PDF after setting PdfSaveOptions.IsFontSubstitutionCharGranularity to true
PdfSaveOptions opts = new PdfSaveOptions();
opts.IsFontSubstitutionCharGranularity = true;
Following methods have been removed from the public API.
Following properties have been removed from the public API.
An object of SaveOptions has to be passed to the Workbook.Save method after setting the appropriate SaveOptions properties.
It is advised to use the Workbook.CreateStyle method to create and manipulate styles for a Workbook instance instead of creating a Style with StyleCollection.Add method. Moreover, Workbook.GetNamedStyle(string) can be used to obtain a named style instead of StyleCollection[string].
With the release of Aspose.Cells 8.3.2, the API introduced another overload of the PivotItem.Move method that accepts the integer count parameter and a boolean parameter to move a PivotItem within the parent node.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.