Is there any fundamental reason that the decodeXls functions need to use IO to parse an xls file? In my use case I would like to decouple the parsing logic from the IO code that reads the file. My workaround is using unsafePerformIO in the following way:
decodeXlsPure :: ByteString -> [[[String]]]
decodeXlsPure content =
unsafePerformIO
. withSystemTempFile "decodeXlsPure"
$ \filePath handler -> do
ByteString.hPut handler content
decodeXlsIO filePath