4

QQ - if I have an Excel spreadsheet on the classpath of a Mule app, can I do a lookup against it using dataweave alone?

machaval
  • 4,969
  • 14
  • 20

1 Answers1

4

In order to use excel as a lookup you need to use the readUrl function using the classpath protocol

var excel = readUrl("classpath://myExcelFile.xlsx", "application/xlsx")
---
(excel.mySheet filter ((entry, index) -> entry.foo == var.foo))[0]
machaval
  • 4,969
  • 14
  • 20