How to detect Charset/Encoding of excel file

Darth_Raven_CZ

New Member
Joined
Jan 7, 2015
Messages
1
I am going to get a bunch of data exports from various systems and most of them will be in Excel file (xls as well as xlsx). I am looking how to detect Encoding of the file via any way, possibly even VBA macro or anything, but automated way (i.e. not converting to csv/txt file). Is there a possibility to write a macro for that?

in worst case scenario - I can somehow manually check xlsx files meta-information in XML. However, I don't see any such possibility for older excel files and that is where I am lost.

Maybe there is easier way that does not use VBA, but I could not find it. Most of similar topics/threads are about "saving" in specific encoding or "creating CSV". I just want to detect, what encoding is used. Can anyone help me?
If it helps, I would be ok with not detection, but checking if file uses UTF-8, so in ideal way, I would know the encoding, in worse case I would be ok with just YES/NO if it uses UTF.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,214,786
Messages
6,121,548
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top