Released: Aug 20, 2024
7.2.0 中的更新
特性
Document Solutions for Excel
- Add Goal Seek to Spreadsheets
- Excel's Goal Seek function enables users to determine the necessary input value to achieve a desired result. By setting a target output, the Goal Seek feature automatically adjusts input values until the desired outcome is reached. This feature is invaluable for scenario analysis and decision-making in Excel modeling.
- DsExcel adds a new API to add the Goal Seek function programmatically to your spreadsheets. The new IRange.GoalSeek(double goal, IRange changingCell) method (Boolean) attempts to achieve the specified goal from the calculated result of the formula in the cell represented by IRange by modifying the specified changingCell. The goal parameter specifies the desired target output, whereas the changingCell parameter specifies the cell whose value will change to achieve the target value.
- Label and Value Filters in Pivot Table
- In this release, DsExcel enhances its Pivot Table Filters support, enabling developers to refine and manage large datasets programmatically in Pivot Tables. The new filter options added in DsExcel help in narrowing down data to focus on specific criteria, making analysis more precise and relevant.
- DsExcel supports a new API to add Label (including Date filters) and Value filters in Pivot Tables. The Label filter API helps to filter data based on the labels in the row or column fields, while the Value filter API shows only the data where values meet certain conditions.
- DsExcel provides a PivotFilters property of the IPivotField interface that enables a user to add Label, Value, or Date filters to the pivot table field using a PivotFilterType enumeration that can be passed as a parameter in the Add method of the IPivotFilters interface.
- The new API additions also include an AllowMultipleFilters property that helps to add both Label and Value filters simultaneously on a field, thereby enabling developers to add multiple filters on a field.
- Also included in the new API additions are ClearLabelFilter, ClearValueFilter, and ClearAllFilters methods to delete the filters.
- Multiple Enhancements in DsExcel Templates
- Filter Data from Single or Multiple Data Sources
- In business scenarios, developers integrate data from multiple data sources. In such applications, there are relationships between the data. Support has been added for representing these relationships by defining Filters in the Excel Template. A single template cell can correspond to multiple records in the data source, and developers can filter the expanded data accordingly. Filters in templates can also be easily modified, allowing the reports to adapt dynamically to changing data. The data can be filtered from System.Data.DataTable or ITableDataSource datasources in .NET and java.sql.ResultSet or ITableDataSource datasources in Java.
- Added the ability to define Conditional and Slice filters using the F or Filter property. The Filter syntax can be added in the desired cell of the Excel Template file. The syntax for the Conditional filter is F/Filter = (field1 > 1 and field2 = 2 or field3 <> 3), enhancing data manipulation and report generation from multiple tables. The Conditional filter allows users to refine their data using operators and keywords like AND, OR, NOT, and LIKE.
- The Slice filter enables data extraction by specifying a range from one index to another. The Slice filter can be added in the desired cell of the Excel Template file.
- Added support for combining the Conditional and Slice filters together that will first filter the records having a Conditional filter and then filter the records as per the Slice filter applied.
- Bind Excel Templates with JSON data source - Excel Templates can now be bound directly with JSON files. In addition, the Filtering support also works with data from multiple JSON data sources.
- Asynchronous IMAGE Function - The IMAGE function in Excel allows users to insert images directly into cells, enhancing the visual appeal of their spreadsheets and making it easier to illustrate points, add logos, or incorporate relevant visuals alongside textual data. With this release, DsExcel now includes the IMAGE function, allowing users to add images within the cells.
- The image types supported are the same as those in the ImageType enum and can display images from online sources via URLs.
- DsExcel also added the Workbook.WebRequestHandler interface to allow users to customize how network requests are sent. The interface allows for the handling of web requests asynchronously and provides a way to send GET requests to a specified URI.
- Enhancement for Asynchronous Calculations - In the v7 release, the AsyncCustomFunction class was introduced, enabling user-defined functions derived from this class to support asynchronous calculations. In this release, this capability has been enhanced by adding the Workbook.WaitForCalculationToFinish() method. This method allows users to ensure that all necessary computations are completed before proceeding with any other operations that depend on the calculation results.
- Multiple Features Supported for SpreadJS Integration
- An Option to Make Filtering Work Similarly to SpreadJS - DsExcel added the option to treat the first row of data as data and not as a header while filtering the data. The API introduces a new Range.AutoFilter() overload, which will help make the DsExcel filter behavior similar to that of SpreadJS. The overload includes the isFirstRowData parameter, which indicates whether the first row of the selection area participates in filtering or not. This feature is reflected only in SpreadJS.
- New Sparkline Functions - DsExcel now supports adding Line, Column, and Win/Loss sparklines through corresponding new functions. The sparklines are compact, simple charts embedded in cells to visualize data trends.
- Multiple Features Supported for Lossless I/O of SpreadJS - With this release, the compatibility of DsExcel has been enhanced with .sjs and SSJSON file formats of the SpreadJS 17.1 version (lossless import/export). Several features have been supported on SJS/SSJSON I/O.
- Pixel-Based Rendering in PDF and Image Export - To enhance the export of spreadsheet content to PDF and images and make it render similar to SpreadJS, DsExcel has added the WorkbookOptions class that offers the property - PixelBasedColumnWidth. If true, the workbook would use pixel-based column width while rendering spreadsheets to PDF and images. Also, this option will make other API behaviors, like Auto-Fit column and other results of PDF and image rendering, more similar to SpreadJS.
- Support for the FromSJSJson API to Load a Single JSON SJS File - DsExcel has added the FromSjsJson method in both the Workbook class and the IWorkbook interface, allowing users to load a JSON file string or stream that is generated from an .sjs file.
- Customize Border Style in Export to PDF - DsExcel now allows you to export PDF documents with a custom border style using the new BorderOptions property of the PdfSaveOptions class. This property uses the BorderWidth and Dashes properties of the CustomBorderStyle class, as well as the BorderLineStyle enumeration, to define the border width, dash length, and line style. The BorderWidth property sets the border width when exporting a PDF document, while the Dashes property determines the length of each segment in the dashed line.
Document Solutions Data Viewer
- Advanced Search Options
- Searching large spreadsheets with specific search terms or patterns is made easier with the new release of DsDataViewer. The Search button is now available by default in the left sidebar. You can search for words within your spreadsheet using the following advanced options:
- "Find What" field represents the string to be searched.
- "Within" option allows you to choose whether to search within the Current Sheet or All Sheets.
- "Match Case" determines whether to ignore case sensitivity. When selected, it will perform a case-sensitive search.
- "Match Exactly" determines whether to perform an exact match. When selected, it will search for an exact match.
- "Use Wildcards" determines whether to use wildcard characters like ?, *, or ~. When selected, you can use wildcard characters for matching.
- The key to add the Search panel programmatically is 'SearchPanel'. To enable users to customize the display of the sidebar, DsDataViewer offers the following API:
- DsDataViewer.showSidebar(boolean): Whether to display the sidebar.
- DsDataViewer.sidebarLayout(string[]): Indicates which sidebars to display.
- Extract Data from Any/Selected Cell Programmatically - You can now programmatically extract the unformatted/formatted value of any/selected cell. DsDataViewer provides a new API that will help to quickly extract specific data without navigating through large spreadsheets. The extracted data can then be consolidated for further analysis.
- DsDataViewer introduces the following new methods to extract data from cells:
- getSheet(index): Fetches the specified sheet based on the index.
- getSheetFromName(name): Fetches the sheet with the specified name.
- getActiveSheet(): Fetches the active sheet.
- The following new methods have been added to the WorkSheet object:
- getSelections(): Retrieves the selections in the current sheet.
- getText(row, column): Retrieves formatted text in the cell based on the desired row and column index.
- getValue(row, column): Retrieves unformatted data from the specified cell based on the desired row and column index.
Document Solutions Image Viewer
- New Secondary Toolbar - 'Effects'
- You can now add effects to your images using a convenient 'Effects' secondary toolbar in the viewer. The toolbar provides the following useful tools allowing you to make any needed adjustments to all or part of the image:
- Brightness.
- Contrast.
- Vibrance.
- Blur.
- Pixelate.
- If a part of the image is selected, the effect is applied to the selected area only. Otherwise, it is applied to the whole image.
- The 'Effects' toolbar can be added via PaintToolsPlugin options using the effectsTools toolbar layout property.
- You can also apply various customizations on the toolbar items by modifying the array of toolbar item types.
- Blur and Pixelate Tools
- DsImageViewer now includes new Blur and Pixelate tools, designed to blur or pixelate all or part of the image. These tools can be applied to selected regions to effectively blur/pixelate parts of an image, making them ideal for tasks such as blurring vehicle license plates or confidential information.
- Blur and Pixelate tools are available by default in the 'Effects' secondary toolbar. You can either apply the filter over the whole image or apply the filter on a selected area of the image.
- The button keys for the Blur and Pixelate tools are 'Blur' and 'Pixelate.' You can customize the Effects toolbar to have only these two items as well.
Document Solutions PDF Viewer
- Introducing WebAssembly(Wasm)-based PDF Viewer
- Introduced the advanced WebAssembly(Wasm)-based PDF Viewer, enhancing the document editing experience locally on the client side with Document Solutions PDF Viewer (DsPdfViewer). This innovative solution is based on WebAssembly and delivers a fast, secure, and highly responsive PDF editing experience directly within your web browser. The Wasm-based PDF viewer is designed to meet the needs of modern users and offers seamless performance, cross-platform compatibility, and an array of advanced features.
- DsPdfViewer users will have new option to enable PDF-editing features in the viewer without the need to set up a .NET server running Document Solutions for PDF (DsPdf) and connecting the viewer to that server via the SupportApi. All editing will be done on the client without sending the PDF and edits to the server to apply the edits and receive back the modified version. The DsPdfViewer/Wasm version would be available with the Professional license.
- In this first release of the DsPdfViewer/Wasm, the following features available when using the server-based SupportApi are not yet supported:
- Adding/applying redacts.
- Electronic signatures.
- Export to raster or SVG images.
- Converting annotations to content.
- Collaboration mode.
- Other PDF Viewer Enhancements
- Two-page View - DsPdfViewer now supports the ability to view two pages side-by-side in order to work with documents with related content on adjacent pages. This enhancement would help to speed up document handling and improve understanding, retaining the context and reducing time spent navigating between pages.
- The viewer's toolbar now includes a tool called "Page Display" with a button key to access programmatically as "page-display." This button replaces the previous "View Mode" button. The "Page Display" button is a dropdown button that allows users to select their desired page display view mode, one of which will be 'Two-page display' mode. Additionally, users can select to toggle the scrolling behavior of the page display mode using the 'Enable scrolling' checkbox available within the dropdown.
- You can also set the page display option programmatically using the new pageDisplayType option to set the initial page display mode when the viewer loads. In addition, the pageDisplay property can be used to set or change your desired page display mode.
- Support for Form Fields with Formatting Functions - Adobe Acrobat supports documents with Form Fields that have additional JavaScript codes associated with Form Fields that help format the fields before displaying the content. Such codes are applied to content like Percent, Number, Date, Time, and Special (mixed format type). In this release, DsPdfViewer supports PDF documents with such additional JavaScript codes. These JavaScript codes can be applied to Form Fields using DsPdf. See the complete list of JavaScript functions.
- Save PDF as SVG - You no longer have to look for online tools to convert PDF to SVG images. In this release, DsPdfViewer adds the ability to save PDF documents to SVG. The Save button dropdown has been enhanced to provide all Save options in one place, and the 'PDF to SVG' option has been included within it.
Document Solutions for PDF
- Remove Images from PDF Documents
- Added support for an API to remove images from PDF documents. The new method GcPdfDocument.RemoveImages(IList<PdfImageInfo> images) has been added that helps to remove images from the document, thereby reducing the size of resultant PDF documents and accomplishing other needs to modify PDF documents. The images are specified by the PdfImageInfo object, which is obtained by using one of GcPdfDocument.GetImages(...) method overloads.
- The images to be removed can also be returned by the new WidgetReferences property added to the PdfImageInfo class. In most cases, images are used by content streams (like Pages, FormXObjects), but images can be referenced directly by the WidgetAnnotation object via properties WidgetAnnotation.ButtonAppearance.Image, WidgetAnnotation.ButtonAppearance.RolloverAppearance.Image, and WidgetAnnotation.ButtonAppearance.DownAppearance.Image. GcPdfDocument.GetImages() now also returns such images through the PdfImageLocation.WidgetReferences property.
Document Solutions for Word
- Hyperlink Properties for Shapes
- You can now add the hyperlink properties HyperlinkOnClick and HyperlinkOnHover on shapes programmatically that add more interactivity to Word documents.
- DsWord has added the HyperlinkOnAction class, which allows developers to add hyperlink properties to all shape classes (Picture, CanvasShape, GroupShape, InkShape, Shape). Specifying these properties also adds the "Edit Link/Open Link/Remove Link" commands to Microsoft Word's context menu on the shape (except on ink shapes).
修补程序
Document Solutions for Excel
- The image size is not same as the PDF file exported by SpreadJS.
- The exported XLSM file is corrupted when opening in MSExcel.
- When a specific XLSX file is loaded and saved, the saved file is corrupted.
- Wrapped text cannot be fully displayed in the exported PDF file.
- The pagination results in the exported PDF file are inconsistent with SpreadJS.
- The rotated circular shapes are distorted in the exported image files.
- The line breaks in the exported PDF file are inconsistent with the PDF file exported by SpreadJS.
- The size of the QR code in the exported PDF file is not same as SpreadJS.
- The borders of some cells are lost in the exported Excel file after loading the SJS file.
- The cell format is changed in the exported SJS file and Excel file after loading the original SJS file.
- The cell format is changed in the exported SJS file after inserting specific rows.
- The page margins in the exported PDF file are inconsistent with SpreadJS.
- The seal is stretched in the exported PDF file.
- The cell background image is inconsistent with SpreadJS in the exported PDF file.
- The filtering status of PivotTable in the exported Excel file is changed.
- The table border in the exported PDF file is thicker than the PDF exported by SpreadJS.
- Some whitespace characters are missing in the exported PDF file.
- The table style is changed in the exported SJS file.
- The border style is changed in the exported SJS file.
- Exception is thrown on saving Excel file containing Charts to PDF file with Norway culture.
- Exception is thrown on refreshing the PivotTable.
- The font size is changed in the exported SJS file after loading the original SJS file.
- The conditional format is incorrect in the exported SJS file.
- Incorrect value returned from array formula when calculation engine is off.
- The table style in the exported PDF file is incorrect.
- Some cell values are not exported in the Excel file when license is not set.
- The result of the LOG function is incorrect.
- Exception is thrown on setting the orientation of PivotField to column field and row field.
- The result of the SEARCH function is incorrect.
Document Solutions for PDF
- If StandardFonts.ZapfDingbats is specified as the default for a field, the font in the generated PDF is incorrect.