Answer the question
In order to leave comments, you need to log in
How to read excel file from response.body?
There is an EndPoint that should return an xlsx file in response.body.
console.log(response.body)
Outputs something like
ZS[Content_Types].xml���n�0E%�J
]TUE`�DzE*�מ
��(�}'�T�V�3w�YM��+�hc�Ű���Ɔy-> f/�(�T0������x4�$��{֢%JR�n�+�b���&f����y.��
...
const buff = await Buffer.from(response.body);
console.log(buff);
BUFFER 50 4B 03 04 14 00 08 08 00 0d 5b 1e 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5b 43 6F 65 65 6e 74 54 79 79 70 65 5D 2E 78 6D 6D 6D 6C ef...
Error: End of data reached (data length = 5979, asked index = 204079104). Corrupted zip?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question