Skip to main content Skip to footer

What's New in GrapeCity Documents for Excel in v6.1

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.

Help .NET | Demo .NET

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.

  1. ScaleX and ScaleY
  2. Resolution
  3. BackgroundColor
  4. ShowRowHeadings
  5. ShowColumnHeadings
  6. ShowGridlines
  7. GridlinesColor
  8. ShowDrawingObjects
  9. 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);

Export 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");

// Copy the selected sheets to the end of current workbook
workbook.Worksheets[new string[] { "FlowChart1", "FlowChart2" }].Copy();
// Save to an excel file

Copy/Move Multiple Sheets at Once

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 for the license type you need.

Have a look at these topics for more information about new features supported -

  1. Tables - Help | Demo
  2. Charts - Help | Demo
  3. Pictures - Help | Demo
  4. Shapes - Help | Demo
  5. Slicers - Help | Demo
  6. Barcodes - Help | Demo
  7. Sorting & Filtering - Help | Demo

The following snapshot shows new Sort and Filter support, and Slicers displayed GcDataViewer.

Sort and Filter support

Help | Demo

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.

Help | Demo

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.

Load data files from remote URL

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");

//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");

Help | Demo

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. 

Show/Hide All Notes

Help | Demo

Ready to Check Out What's New? Download GrapeCity Documents for Excel .NET and Java now!



comments powered by Disqus