count the number of excel Sheets

Certified Associate Developer

In the interface user has privilege to upload the excel document, we are using the function readexcelsheetpaging to get the information from the 4th sheet of the uploaded excel. when the user uploads the excel with sheets < 4 expression error is shown. Is there a way to check the number of sheets in the excel uploaded  before passing it to readexcelsheetpaging function?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Generally for scenarios like these I prefer to add validation in the excel template itself so that users cannot save the file unless they have filled data as per requirement. Its generally is easy as well with or without macros. 
    Assuming you are providing the users with a template to work with easiest will be to Protect the worksheet so that users cannot delete the sheet. Excel functions like SHEET() etc can help in saving and fetching sheet count from excel workbook as well.

    More details will enable me to help you better. Meanwhile explore excel validations instead of Appian ones for your usecase.

Reply
  • 0
    Certified Lead Developer

    Generally for scenarios like these I prefer to add validation in the excel template itself so that users cannot save the file unless they have filled data as per requirement. Its generally is easy as well with or without macros. 
    Assuming you are providing the users with a template to work with easiest will be to Protect the worksheet so that users cannot delete the sheet. Excel functions like SHEET() etc can help in saving and fetching sheet count from excel workbook as well.

    More details will enable me to help you better. Meanwhile explore excel validations instead of Appian ones for your usecase.

Children
No Data