今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Parsing Excel CSV files: commas and newlines
- [Instructor] The previous movie discussed the basics of parsing Microsoft XL CSV files using AWK including dealing with the MS-DOS line endings, quoted cell values and quotes within quoted cell values. This movie continues XL CSV parsing including the more difficult problems of commas and new lines within cell values. The second case in which Excel will surround a field with quotes, is if it contains a comma. If this occurs, there is no easy way for AWK to tell which commas in the CSV file actually to limit fields. If your Excel data contains commas, my recommendation is to open the CSV file in Excel or the original Excel file and re-save it in tab limited text format. So we'll do that. Yes, we really meant it. Once you have done that all we need to do is change the field specifier from a comma to a tab and work with the dot txt file we just created instead of the CSV file we were starting with. Other than that you…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。