The GrapeCity Documents for Excel (GcExcel) v6 release introduces the new GrapeCity Documents DataViewer (GcDataViewer), a JavaScript-based client-side viewer that you can use to load and preview data documents such as Excel (XLSX) and CSV files. It aims to provide a unified solution to view any data-related document in one place.
In this blog, we’ll learn, explore, and understand the new GrapeCity Documents DataViewer through the following topics:
Ready to Check it Out? Download GcExcel to get the GcDataViewer Today!
Business these days is mostly about data; tons of data are generated daily by Enterprise systems. These data are stored in different data formats such as Excel (XLSX), CSV, JSON, XML, and many others. Viewing data in these files require particular tools, thus ending up with multiple third-party applications on your machine or searching for disparate sources online. Further, if the data is in a raw form within the system, you are required to write a lot of code to parse and present the data in a readable form.
GcDataViewer can help here by allowing data viewing capabilities that can be seamlessly integrated into existing systems or in new applications.
GrapeCity Documents DataViewer can find its use in any data-driven business or company, such as Sales, E-Commerce, Stock Market, Healthcare, Consultation, etc., looking for a solution to:
It can be used by developers searching for an option to open data files generated by the server side of their applications and view the data.
Download GcDataViewer | Get the npm package | License Info
We are excited to share the first glimpse of the GcDataViewer in the image below:
The user interface of the viewer comprises the following:
A Toolbar lies at the top of the GcDataViewer and consists of viewer options as shown below:
These options (in the order) serve the following purpose:
Open: Use this option to load a data document into the GcDataViewer. This option opens a dialog where you can choose the data file type from among Excel (XLSX), CSV, and SpreadJS (SSJSON) data formats. Further, it provides several options to manage and control your data load. For example:
Zoom: This option controls the viewing area of the data display area. It allows the user to select a value from a set of preset values, or enter a value manually in the zoom input box, or click the +/- buttons, and also zoom using the mouse wheel, touchpad, or touch screen.
Toggle View: Click the Toggle View button to switch to a full-screen display of the data display area as illustrated below:
Theme: Cycle through a list of pre-defined themes that change the color and font appearance of the viewer's component as shown below:
These built-in themes are included in the themes folder of the GcDataViewer JS package. Keep the themes folder in the same directory as the gcdataviewer.js script file.
About: Shows the product information in a pop-up at the bottom.
The Data Display Area is the space in the viewer where the data from your data document appears in a structured layout.
It consists of the following components:
Supported Sheet Operations
The grid allows the following operations on the sheet:
The status bar appears at the bottom of the Data display area. It shows information about the selected area and the aggregate information, such as Average, Count, and Sum, captured within that area.
Check out the GcDocs Data Viewer Demo Samples.
You can find the use of GcDataViewer in different applications because of the varied features it provides, including:
Learn more about GcDataViewer from the documentation.
Let us look at the steps to configure the GcDataViewer in a new ASP.NET Core Application.
Step 1 - Create a new ASP.NET Core Web App in Microsoft Visual Studio (VS): provide a project name, choose .NET 6 Framework, and uncheck HTTPS.
Step 2 - In Solution Explorer, select the wwwroot/lib folder, open the terminal to run the npm command, and download the gcdataviewer package.
Step 3 - In the terminal, run the command - npm install @grapecity/gcdataviewer. After downloading, you can find the files under the lib/node_modules/@grapecity/gcdataviewer folder:
Alternatively, you can manually copy the gcdataviewer files available in the GcExcel .NET | Java package to the wwwroot/lib folder.
Step 4 - In VS, add a new HTML page to the wwwroot folder and name it index.html:
Step 5 - Paste the following code in the index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Grapecity Data Viewer">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes" />
<title>Grapecity Data Viewer Sample</title>
<script type="text/javascript" src="lib/node_modules/@grapecity/gcdataviewer/gcdataviewer.js"></script>
<script>function loadDataViewer(selector) {
var viewer = new GcDataViewer(selector, {});
}
</script>
<style>
#root {
height:100vh;
}
</style>
</head>
<body onload="loadDataViewer('#root')">
<div id="root"></div>
</body>
</html>
Step 6 - Replace the content of the Program.cs with the following code. This will open the index.html by default when the app starts.
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseRouting();
app.Run();
Step 7 - Build and run the application. A page with the GcDocuments for Excel Data Viewer appears in the browser as shown below:
Step 8 - Click the Open Document button to load your favorite document. The viewer with a document appears as below:
Check out our video tutorial to get started with the new GcDocs Data Viewer.
This is just the beginning of revolutionizing data viewing needs for a business. There are many more things planned for GcDataViewer in the future, including support for more data formats, data transform capabilities, making calculations, changing data formats, converting to other data formats, and much more.
Explore the new data viewing experience and share it with us in the comments section below or write to us at us.sales@grapecity.com
Ready to Check it Out? Download GcDataViewer Here Today!