• German
  • Docs
  • Knowledge
  • F.A.Q
  • Forum
  • Media
  • Courses
  • Marketplace
  • Login
  • Try for free
  • German
  • Docs
  • Knowledge
  • F.A.Q
  • Forum
  • Media
  • Courses
  • Marketplace
  • Login
  • Try for free
home/Knowledge Base/How to's/Full-Text Search For Excel Files

Full-Text Search For Excel Files

Written by Christian Kleinschroth
April 21, 2021

Prerequisites

You need sheet.js available as external library on your Simplifier instance:

Please refer to this Knowledge Base article to learn how to integrate external libraries.

Step 1 – Client-side Business Object

Create a client-side Business Object (BO) function call for implementing the logic of the full-text search:

// input: 'file' (Any), 'searchValue' (String)
// output: 'result' (Boolean)
var reader = new FileReader();
reader.onloadend = function() {
    var data = new Uint8Array(reader.result);
    var workbook = XLSX.read(data, {
        type: 'array'
    });
    var result = false;
    for (var i = 0; i <= workbook.SheetNames.length-1; i++) {
        var currentSheet = workbook.Sheets[workbook.SheetNames[i]]
        var rowObj = XLSX.utils.sheet_to_row_object_array(currentSheet);
        var jsonObj = JSON.stringify(rowObj) ;
        var re = new RegExp(oPayload.searchValue);
        result = re.test(jsonObj);
        if (result) {
            break;
        }
    }
    fnSuccess({
        result: result
    });
};
reader.readAsArrayBuffer(oPayload.file);

Step 2 – Application Editor: Add sheet.js As External Library

Add sheet.js as external library to your Simplifier app (Knowledge Base article):

Step 3 – UI Designer: User Input

Use the FileUploader (1) widget, so that the user can select a Excel file to analyze. In addition, add an Input (2) widget for entering the search value. With the ‘search’-Button (3) the user starts the full-text search.

Step 4 – Process Designer: Story

Create a story for the workflow:

  1. Subscribe to ‘search’-Button’s press event
  2. Extract file from FileUploader using a script block:
    // replace "FileUploader" with the ID of your FileUploader widget
    var uploaderInput = this.getView().byId("FileUploader");
    
    if (uploaderInput.getValue() !== "") {
        var files = uploaderInput.oFileUpload.files;
    
        if (files.length === 1) {
            var file = files[0];
        }
    }
    // create a global variable "uploaderFile" (String) to store the file 
    this.getGlobals().setVar("uploaderFile", file);
  3. Use your client-side ‘fullTextSearch_Excel’ function call from Step 1 to get the result of the full-text search
    1. Input: ‘uploaderFile’,  search ‘value’ (input widget)
    2. Output: full-text search ‘result’

Step 4 – Result

To display the result you can use an ObjectStatus widget and specify the state and icon property with a condition shape in the process designer (1):

  1. status = ‘Success’ in case of a positive result (true) (2)
  2. status = ‘Error’ in case of a negative result (false) (3)
Tags:designerUIscripttextto

Was this article helpful?

Yes  1 No
Related Articles
  • Fine-tuning and Running Custom AI Models in Simplifier
  • Using the Simplifier Teams App
  • How to integrate value help and suggestions in user inputs
  • How to integrate Simplifier in CI/CD pipelines
  • How to use Google reCAPTCHA v3 Essentials
  • How to use Simplifier Content Repository Plugin
Leave A Comment Cancel reply

You must be logged in to post a comment.

How to's
  • Full-Text Search For Excel Files
  • How to integrate and use external libraries in Simplifier Apps
  • Working with Drag and Drop
  • Create Test Cases With The UI5 Test Recorder
  • Full-Text Search For PDF Documents
  • How to Implement an Approval App in Simplifier
  • Create a PDF Template via Plugin
  • Generating a PDF with Simplifier via Plugin
  • How to use Query Options in ODataV2 Connector
  • How to use TimePicker widget
  • How to set Simplifier environment variables in Open Shift
  • How to send and receive Push Notifications
  • Dynamic where-clause and repeatable statement
  • Version and Release Management in Simplifier
  • Logs and Monitoring in Simplifier
  • Use the Adobe PDF Embed API in your Simplifier Application
  • PDF Templates: make the Header/Footer content dynamic
  • Converting Text to Speech with the Google TTS Connector
  • Authentication through another window
  • Creating a ChatBot Client for ChatGPT
  • How to use Simplifier Content Repository Plugin
  • How to use Google reCAPTCHA v3 Essentials
  • How to integrate Simplifier in CI/CD pipelines
  • How to integrate value help and suggestions in user inputs
  • Using the Simplifier Teams App
  • Fine-tuning and Running Custom AI Models in Simplifier
Knowledgebase Categories
  • Getting Started 4
  • Best Practices 3
  • How to's 26
  • Layout & Design 4
  • Widgets 8
  • Cloud Services 6
  • Database Handling 1
  • Integrations 10
  • Plugins 6
  • Mobile Client 2

  How to Implement an Approval App in Simplifier

Full-Text Search For PDF Documents  

GetApp Review

User Reviews

capterra

User Reviews

For AWS Customers

For SAP Customers

  • Contact | Imprint | Privacy | © 2025 Simplifier AG. All Rights Reserved.

  • English
  • German

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.