Passing a format string as a function argument

Short answer, you can’t pass it as an argument to the @sprintf macro.
Instead use the function the macro call expands to:

s = Printf.format(fmt, fld)

and also the format string is not a string, but needs to be preprocessed via

fmt = Printf.format"%.0e"

See this thread for the discussion of basically the same problem.