B
B
Bauyrzhan (Baur) Sovetkali2018-06-06 12:08:25
Database
Bauyrzhan (Baur) Sovetkali, 2018-06-06 12:08:25

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

2 answer(s)
R
Rsa97, 2018-06-06
@Rsa97

0x50 - P
0x4B - K
Looks like a standard compressed file header. So just write the data to the file in binary mode.

R
Roman Mirilaczvili, 2018-08-03
@2ord

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 question

Ask a Question

731 491 924 answers to any question