Excel files with byte order mark for UTF-8 causing errors

↘锁芯ラ 提交于 2019-12-19 10:43:08

问题


I am just wondering if there is any possible way to fix this. I receive Excel files at work that contain the splicing information for fibre joints, and when I try to import then I get an output error saying the first table didn't match up with what it expected to see. When I then open it, I can see the BOM for UTF-8 as  directly before the word like this Joint Name.

Obviously this is hidden in the original file, and it causes a bit of manual work having to remove each of the symbols from each Excel file. Currently the files I am receiving are in a .csv format and the error files come back as a .csv with the symbols showing.

Is there any way I can pre-save these to remove the BOM or something to avoid the manual work in this situation?

Ideally I'd like to remove the hidden BOM so that the import just works the first time without rework.


回答1:


I have figured out the answer, will leave it here for anyone who is encountering a similar issue.

Open the csv file in Notepad++, in the encoding menu you can change from UTF-8 BOM to UTF-8. Save the file and it is gone, simple as that.

Good luck!



来源:https://stackoverflow.com/questions/33510700/excel-files-with-byte-order-mark-for-utf-8-causing-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!