How to Sign XLSX with QR Code using C#

Adding a QR Code as a signature to Excel document can be a valuable way for enhancing document security and distinguishable. The utilization of QR codes presents a creative and innovative method to elevate the document signing process. This tutorial will help you to sign XLSX with QR Code using C# and highlight its benefits and the essential steps involved. Moreover, a code example will be provided to demonstrate how to create QR Code in XLSX using C#. Let’s proceed by outlining the key steps in the XLSX signing process.

Steps to Sign XLSX with QR Code using C#

  1. Install GroupDocs.Signature for .NET via NuGet package manager into your project to sign XLSX file with QR Code
  2. Add reference to the necessary namespaces to insert QR Code into XLSX
  3. Create object of Signature class by passing the path of input XLSX file as an argument to its constructor
  4. Create object of the QrCodeSignOptions class and set desired properties for QR Code
  5. Call Signature.Sign method, passing the appropriate signing options for the QR Code, in order to save the resulting XLSX to disk

The library used in this tutorial is designed to operate seamlessly on various platforms. Signing XLSX documents with a QR Code is achievable on widely-used operating systems such as Windows, macOS, and Linux, provided that .NET is installed. By following these guidelines, you can smoothly integrate QR Code into XLSX in C#, which will enhance document security and legal validity. To see the implementation of this signing process, refer to the code example below.

Code to Sign XLSX with QR Code using C#

using GroupDocs.Signature.Domain;
using GroupDocs.Signature.Options;
using GroupDocs.Signature;
namespace SignXLSXwithQRCodeUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Signature library
License lic = new License();
lic.SetLicense(@"GroupDocs.Signature.lic");
// Import the source XLSX to eSign with QRCode
Signature signature = new Signature("input.xlsx");
// Create QRCode option with predefined QRCode text
QrCodeSignOptions qroptions = new QrCodeSignOptions("JohnSmith")
{
// Setup QRCode encoding type
EncodeType = QrCodeTypes.QR,
// set signature position
Left = 50,
Top = 150,
Width = 200,
Height = 200
};
// Sign and save the output XLSX
signature.Sign("output.xlsx", qroptions);
}
}
}

In summary, QR Code offers an innovative and effective method to sign XLSX document, improving security and simplifying the verification process. This guide has comprehensively covered all the steps on how to insert QR Code in XLSX. After successfully configuring the suggested signature library and making the required adjustments to the file paths, incorporating the code for signing XLSX files into your projects becomes a seamless and straightforward task.

In our earlier tutorial, we provided a step-by-step guide on signing PDF with text signature. If you require additional support, we highly recommend consulting our comprehensive guide on how to sign PDF with text signature using C#.

 English