Excel files - For example, .csv file encoding problems are converted to UTF-8 encoding methods to solve the problem of Chinese garbled characters - to solve the scientific notation display problem

Solve excel file encoding problems

1. Method 1:

Click on the excel file a little bit, then select the open method, select to use Excel 2016 software to open
insert image description here
insert image description here
Select Tools --> Web Options
insert image description here

Choose UTF-8 encoding here
insert image description here

2. Method 2 (recommended, not prone to some weird problems)

Export wps as .csva file .txt, then modify the suffix of the csv file to be a text file, save the .txt text file as a .txt text file, there is an option to modify the encoding during the save as process, here select UTF-8 encoding, and then Change the suffix of the .txt text file back to the .csv file, and then you can solve the Chinese garbled problem.

Remember to overwrite the original .txtfile

insert image description here

3. Solve the scientific notation display problem of excel files

The author recommends

It is best to create a new .xlsxfile , pay attention to .xlsxthe file, and then copy the data that may be garbled in Chinese to the new xlsxfile , because the original excel file may have some format problems, and then start the following steps.
(If the problem of Chinese garbled characters and scientific counting exists at the same time, then the author recommends solving the problem of scientific counting first, and then solving the problem of Chinese garbled characters. This order is more reasonable. For example, first export xlsxthe file csvfilecsv The corresponding field data format, and then modify the encoding of csvthe file to solve the Chinese garbled problem.

The best excel file modification sequence tested by the author:

xlsx —> csv —> csv 内某个字段格式修改 —> csv 文件编码修改

3.1

Sometimes, a field in an Excel file will be displayed as a scientific notation problem, then you need to right-click the field to set the cell format and select the value

insert image description here

select value
insert image description here

Then finally, eliminate Chinese garbled characters according to method 2. Method 1 is a bit unreliable. All fields will be separated by commas. When importing csvfiles super weird and there may be an error, but it affects There is no data import, but the imported data is completely unusable. If you think you want to test it yourself, consider it yourself.


											end

The author's test record: (for reference only, do not operate, mess around, don't follow the operation below)

Then continue to select Format Cells and continue to configure the format (The author generally puts the data in this field into .txta text file to eliminate some possible format problems, and then copies it into the excel file

If there is a situation where the data cannot be copied, it may be necessary to replace the new excel file and copy the data to the newly created excel file, which is generally an xlsx file. I have configured it as a text format before, because, if not format, it may not be possible to copy and paste the data into the excel file, but this method conflicts with the scientific notation configuration. If the scientific notation is configured, then, it is best to create a new excel file. The following text 文本格式配置会覆盖掉原来的数值配置configuration please ignore.

insert image description here

After modification, the field may look as if it has not been modified, but in fact it is just that the width of the field is not enough, automatic scientific notation display, just widen and save.

Guess you like

Origin blog.csdn.net/qq_42701659/article/details/130017784