Answer the question
In order to leave comments, you need to log in
How to get file from attachment as 0x504B...?
Hello.
I get a value from the database in the field, of this form: 0x504B03041 ... etc.
I know that the file is in xlsx format.
How can the values from the file be converted back to xslx?
Answer the question
In order to leave comments, you need to log in
0x50 - P
0x4B - K
Looks like a standard compressed file header. So just write the data to the file in binary mode.
Representation of initial data - in hexadecimal format. So, they need to be converted to byte representation.
xslx is a regular zip file with a 0x504B header (first 2 bytes).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question