
excel導入csv文件
Microsoft Excel will automatically convert data columns?into the format that it thinks is best when opening comma-separated data files. For those of us that don’t want our data changed, we can change that behavior.
Microsoft Excel將在打開以逗號分隔的數據文件時自動將數據列轉換為它認為最佳的格式。 對于那些不想更改數據的人,我們可以更改其行為。
You have a CSV file probably exported from other application or given to you by other people. You would like to open it up in Excel since you know it very well. The CSV file will look like this (if you open the file in notepad.exe):
您有一個CSV文件,它可能是從其他應用程序導出或由其他人提供給您的。 您很想在Excel中打開它。 CSV文件將如下所示(如果您在notepad.exe中打開文件):

The file contains columns: ProductModelID, Name, SpecialID, and ModifiedDate. The column SpeicalID containing data with leading 0 and it is specialized code so you would like to keep the?leading 0s in Excel. Since it is a CSV file it is, by default, shown in your Windows Explorer as an Excel file:
該文件包含以下列:ProductModelID,Name,SpecialID和ModifiedDate。 SpeicalID列包含前導0的數據,它是專用代碼,因此您希望在Excel中保留前導0。 由于它是CSV文件,因此默認情況下在Windows資源管理器中將其顯示為Excel文件:

So you double-click the file and open the file in Excel as such:
因此,您雙擊該文件并按如下方式在Excel中打開該文件:

You can see that by default, Excel stripped out the?leading 0s in column 3 “SpecialID
您可以看到,默認情況下,Excel在第3列“ SpecialID”中去除了前導0
翻譯自: https://www.howtogeek.com/howto/microsoft-office/how-to-import-a-csv-file-containing-a-column-with-a-leading-0-into-excel/
excel導入csv文件