VintaSoft Imaging .NET SDK 12.5: Documentation for Web developer
In This Topic
    XLSX: Work with worksheets in XLSX document
    In This Topic
    WebSpreadsheetEditorControlJS control allows to view the XLSX worksheet in a web browser.

    WebSpreadsheetDocumentEditorControlJS control allows to work (view, add, copy, rename, move, delete) with worksheets of XLSX document in a web browser.
    Worksheets can be changed using mouse/keyboard or programmatically.


    Add new worksheet to an XLSX document

    If you want to add an XLSX worksheet using mouse, you should do the following steps:
    Here is JavaScript code that demonstrates how to add the new worksheet to XLSX document:
    // _spreadsheetDocumentEditorControl is an instance of WebSpreadsheetDocumentEditorControlJS class
    
    // add new worksheet after focused worksheet
    _spreadsheetDocumentEditorControl.addWorksheet();
    
    


    Copy an existing worksheet into XLSX document

    If you want to copy an existing worksheet into XLSX document using mouse, you should do the following steps:

    Here is JavaScript code that demonstrates how to copy an existing worksheet into XLSX document:
    // _spreadsheetDocumentEditorControl is an instance of WebSpreadsheetDocumentEditorControlJS class
    
    // create copy of focused worksheet and paste created copy after focused worksheet
    _spreadsheetDocumentEditorControl.copyWorksheet();
    


    Rename an existing worksheet of XLSX document

    If you want to rename an existing worksheet of XLSX document using mouse, you should do the following steps:
    Here is JavaScript code that demonstrates how to rename an existing worksheet of XLSX document:
    // _spreadsheetDocumentEditorControl is an instance of WebSpreadsheetDocumentEditorControlJS class
    
    // rename the focused worksheet
    _spreadsheetDocumentEditorControl.renameWorksheet("NewWorksheetName");
    


    Move an existing worksheet of XLSX document

    If you want to move an existing worksheet of XLSX document using mouse, you should do the following steps:
    Here is JavaScript code that demonstrates how to move the first worksheet to the third place in XLSX document with three worksheets:
    // _spreadsheetDocumentEditorControl is an instance of WebSpreadsheetDocumentEditorControlJS class
    
    // create and array with worksheet indexes
    var newIndexes = [1, 2, 0];
    
    // reorder the worksheets in workbook using order specified in array "newIndexes"
    _spreadsheetDocumentEditorControl.moveWorksheets(newIndexes);
    


    Delete an existing worksheet from XLSX document

    If you want to delete an existing XLSX worksheet using mouse, you should do the following steps:

    Here is JavaScript code that demonstrates how to delete an existing worksheet from XLSX document:
    // _spreadsheetDocumentEditorControl is an instance of WebSpreadsheetDocumentEditorControlJS class
    
    // remove the focused worksheet
    _spreadsheetDocumentEditorControl.removeWorksheet();