GrapeCity Documents for Excel (GcExcel) v6.1 release is now LIVE! The release supports the new SpreadJS ‘.sjs’ file format and Excel Template files ‘.xltx’ format. In addition, GcExcel supports more features for SpreadJS compatibility and multiple enhancements to GcDataViewer. Have a look at the key highlights below.
Ready to Check Out What's New? Download GrapeCity Documents for Excel .NET and Java now!
Import/Export SpreadJS .sjs file
GcExcel .NET introduces support for the new SpreadJS file format ‘.sjs’ to import/export spreadsheet features from SpreadJS ‘.sjs’ files to Excel or large files of popular formats such as xlsx, xlsm, csv, ssjson, etc., to ‘.sjs’ in lesser time and exported in a smaller size.
The existing methods of GcExcel - Open and Save of the Workbook class have been enhanced to support .sjs files. While loading or saving a ‘.sjs’ file, you can use the new enum option “Sjs” in OpenFileFormat and SaveFileFormat enums.
With the support of the new file format, the following features will be supported -
- Faster conversion of large Excel files to .sjs format.
- Save exported files with a smaller footprint.
- Import/Export Excel/SpreadJS features to/from SpreadJS.
- Generate a single JSON string from the JSON files zipped in the .sjs file.
- Customize opening and saving of .sjs files using various options available.
New classes SjsOpenOptions and SjsSaveOptions, have also been added, using which you can control which spreadsheet features to include/exclude while importing/exporting the ‘.sjs’ files.
The feature is currently supported in the GcExcel .NET version only.
Have a look at the following resources to learn more about this format.
Support for XLTX File Format
You can now directly load Xltx files in GcExcel, modify and save them back. GcExcel supports the new Xltx file format on I/O. Workbook.Open and Workbook.Save methods now accept new XltxOpenOptions and XltxSaveOptions classes to load an XLTX workbook or save it back to the workbook. You can either load and save Xltx from or to a file or file stream.
The following code opens and saves a .xltx file with GcExcel.
// Create a new workbook.
var workbook = new GrapeCity.Documents.Excel.Workbook();
// Open xltx file.
workbook.Open(Path.Combine("Resources", "excel-loan-calculator.xltx"), OpenFileFormat.Xltx);
// Save workbook as xltx file.
workbook.Save("Exported.xltx", SaveFileFormat.Xltx);
Have a look at the following resources.
Help .NET | Demo .NET | Help Java | Demo Java
Export options in ToImage() method
GcExcel already provides a way to convert a worksheet, any specified range, and various shape types to images using the ToImage method.
GcExcel also now adds ImageSaveOptions class providing various properties to modify and adjust the image when exporting a worksheet, a range, or a shape to an image file.
- ScaleX and ScaleY
- Resolution
- BackgroundColor
- ShowRowHeadings
- ShowColumnHeadings
- ShowGridlines
- GridlinesColor
- ShowDrawingObjects
- BlackAndWhite
The following code sets the background color of the exported worksheet image and sets the gridline color:
ImageSaveOptions options = new ImageSaveOptions();
// Set the background color of the exported image
options.BackgroundColor = Color.FromArgb(226, 231, 243);
// Set the gridlines of the exported image
options.ShowGridlines = true;
options.GridlineColor = Color.FromArgb(145, 167, 214);
worksheet.ToImage(outputStream, Drawing.ImageType.PNG, options);
Have a look at the following resources to know more about these options.
Help .NET | Demo .NET | Help Java | Demo Java
Copy/move multiple sheets at once
GcExcel adds new methods - Copy, CopyBefore, CopyAfter, Move, MoveBefore, and MoveAfter methods in the IWorksheets interface that would help to copy or move multiple worksheets to the desired locations or at the end of the workbook at once.
//create a new workbook
var workbook = new GrapeCity.Documents.Excel.Workbook();
// Load template file FlowChartsFile.xlsx from resource
var fileStream = this.GetResourceStream("xlsx\\FlowChartsFile.xlsx");
workbook.Open(fileStream);
// Copy the selected sheets to the end of current workbook
workbook.Worksheets[new string[] { "FlowChart1", "FlowChart2" }].Copy();
// Save to an excel file
workbook.Save("CopyMultipleWorksheets.xlsx");
Help .NET | Help Java | Demo Copy multiple worksheets .NET | Demo Move multiple worksheets .NET | Demo Copy multiple worksheets Java | Demo Move multiple worksheets
Support for SJS features
- Support Form Controls on JSON I/O - Demo .NET | Demo Java
- Support for allowResize property on JSON I/O - Help .NET | Help Java
- Addition of ExportSharedFormula of GcExcel to set whether to export formula as shared formula or not when converting workbook to JSON - Help .NET | Help Java
GrapeCity Documents Data Viewer (GcDataViewer)
Introducing Standard and Professional licenses
GcDataViewer now includes two types of production licenses: Standard and Professional.
Standard License
The standard license provides access to all the standard view features, such as opening documents, zooming in and out, working with viewer themes, displaying cell and formula results, etc. For more information about these features in the standard license, see GcDataViewer License Options.
Professional License
The professional license provides access to all the features of the standard license, along with interactive operations such as filter and sort, slicer, and data visualization objects such as charts, barcodes, pictures, shapes, SJS barcode formula results, etc. For more information about these features in the professional license, see GcDataViewer License Options.
Contact us.sales@grapecity.com for the license type you need.
Have a look at these topics for more information about new features supported -
- Tables - Help | Demo
- Charts - Help | Demo
- Pictures - Help | Demo
- Shapes - Help | Demo
- Slicers - Help | Demo
- Barcodes - Help | Demo
- Sorting & Filtering - Help | Demo
The following snapshot shows new Sort and Filter support, and Slicers displayed GcDataViewer.
Customize toolbar options
GcDataViewer now adds the ability to modify the toolbar layout and hide or reorder the buttons for the three view modes: default (desktop), mobile, and fullscreen, using the GcDataViewer.toolbarLayout interface which returns DataToolbarLayout object. You can perform the following to customize the toolbar -
- Get information about current toolbar buttons
- Modify the current layout of the toolbar by hiding or reordering the buttons
- Remove or reorder the buttons in the toolbar
- Customize the toolbar specific to these view modes - default (desktop), mobile, and fullscreen
The code below modifies the default layout of the toolbar with a limited set of buttons.
let viewer = GcDataViewer.findControl("#root");
// Modify the toolbar layout for default view mode.
viewer.toolbarLayout = { default : ['open', 'zoom', 'fullscreen', 'theme-change']};
Have a look at the following resources.
Load data files from remote URL
GcDataViewer now supports loading data files from remote URLs either from UI or through code. In UI, the ‘Remote’ option has been added to the Source dropdown.
You can provide both absolute and relative URLs. Since GcDataViewer is a pure front-end product, you must ensure the target URL file is accessible across domains.
The same can be provided through code, either as a URL string or object. Both absolute and relative URLs can be provided through code.
//URL string
viewer.openFile("http://localhost:5005/Family monthly budget1.xlsx");
//URL object
let url = new URL("http://localhost:5005/Family monthly budget1.xlsx");
viewer.openFile(url);
//Absolute URL
viewer.openFile("http://localhost:5005/Family monthly budget1.xlsx");
//Relative URL. The base URL is the URL of the current page.
viewer.openFile("Family monthly budget1.xlsx");
Show/Hide all Notes
GcDataViewer adds Show/Hide Notes toggle button to show or hide all the notes in the spreadsheet (XLSX and SSJSON) with one button click. The toggle button displays all the notes in a spreadsheet if they are hidden, or it hides all the notes if they are set to always display.
The Show/Hide Notes toggle button is especially useful in complex input form documents, such as loan calculation forms, where users might require clues to fill out the form. Hence, customers can show or hide notes using the toggle button per their requirements.
Ready to Check Out What's New? Download GrapeCity Documents for Excel .NET and Java now!