69
Views
11
Comments
[Advanced Excel] Error "Validation failed: Formula2 must be set if operator is between or notBetween"
advanced-excel
Service icon
Forge asset by Carlos Freitas
Application Type
Service

Hello Outsystems forums,

We want to ask about the error message we've mentioned in the title in our Traditional Web app. We created a logic to bootstrap an excel file to inserting data to a table, when executing the Workbook_GetBinaryData function this message appear:

We've tried to debug and this is the exact location where the error occurred:

I assumed this is because of the new excel format we've been trying to use, but I have no idea what causing the error. If I check the excel file, there is no formula or value in AA2:AA3 cells:

Any clue of what causing this error?

Thank you,

Aditya

2022-08-03 04-32-50
Ravi Punjwani

Here's a quite matching error from EPPlus Library. I'm sure you've something wrong with your workbook. Did you look into other worksheets of your file? May be there are some other formulas configured that fails validation.

https://github.com/JanKallman/EPPlus/issues/481

2021-01-19 14-07-32
Tom Zhao

@Aditya Prabowo
Can you share your Excel file. If possible please also share your Oml file, Then we can look into it.

Regards,

UserImage.jpg
Aditya EP

Hello Tom,

Thank you for the responses, I've attached the sample .oml and excel sample. Thank you.

SampleAdvancedExcel_v1.oml
UserImage.jpg
Aditya EP

Here is the excel sample.

Template Upload.xlsx
UserImage.jpg
Aditya EP

Hello, any update or clue about what causing the issue?

Thank you very much,

Aditya

2025-09-25 22-50-38
Hanno

According to that link that @Ravi Punjwani shared, there seems to be a bug in the epplus library that might have a simple fix.

@Aditya Prabowo can you try to update your extension in your environment to see if that works?


UserImage.jpg
Aditya EP

Hello Hanno,

We've just updated the extension to the latest version.


Unfortunately the issue still persist:

2022-08-03 04-32-50
Ravi Punjwani

Hi @Aditya Prabowo 

You might need to find out properly regarding the custom validations set up in your workbook.

I checked the Excel file you shared, and it has many validations set up. It seems the extension works correctly only, just that you need to remove any unwanted validations set up in your workbook.

Here's the link to find out where are any validations configured

https://support.microsoft.com/en-us/office/find-cells-that-have-data-validation-rules-7940468a-c95d-422f-a3fb-8fa0b90e5810#ID0EBBF=Newer_versions

I tried to find but there were many cells selected so couldn't figure out which one is creating an issue in your case. Hint: Couldn't find anything on the range AA2:AA3, so it seems a bit of a research to figure this out.

If you know the source of this Excel file, you can ask them too. Otherwise it might take a bit longer obviously.

2022-08-03 04-32-50
Ravi Punjwani

I'm attaching your file again with a little change. I've cleared all validation rules in the file. Give it a go and see if it works.

Template Upload.xlsx
UserImage.jpg
Aditya EP

Hello Ravi, 

Thank you for the update. The sample file did work and can be inserted to the system, sure but we still need the validation and dropdown option for the end-user to create the template. Do you have any idea which validation or column that causing the previous error? So we can modify the template.

Thanks,

Aditya

2022-08-03 04-32-50
Ravi Punjwani

Unfortunately I couldn't find which validations caused that error. But now you know some direction to look into.

Try out debugging the .Net extension that generates your excel file, this way you will get more information programmatically and would be able to resolve it. So three options with you now:

  1. remove validations one by one in your source Excel file and try running with that each time
  2. Remove data attributes in half of your data records, then try other half. In each trial narrow down your search and find out which one caused error. Like you do in any binary search.
  3. debug the .Net extension and find out what's actually causing the error.

Decide whichever option works best for you.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.