【发布时间】:2012-01-21 05:20:52
【问题描述】:
我有不同的 CSV 文件,这些文件有一些原始数据
Computer Name,"Computer Serial","User name","Employee Number","Software name" 后跟以下数据。
从链接文件中添加了这个:
Comp;uter;"Name ";Computer;Seria;l"" User";"name"" Employee";"Number"" Software";"name"""
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"LiveUpdate 3.3 (Symantec Corporation)";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Adobe SVG Viewer 3.0";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Adobe Download Manager 2.0 (Supprimer uniquement)";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"ATI - Utilitaire de désinstallation du logiciel";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"ATI Display Driver";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"IBM iSeries Access for Windows";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,DomusDraw;;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"NeXspan SoftPhone i2052 R3.1 D03";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Désinstallation du logiciel d''imprimante IBM";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Désinstallation du logiciel IBM";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"CA 01 - le Offline MALL de Siemens Automation and Drives";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Java Web Start";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Correctif Windows XP - KB873339";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Correctif Windows XP - KB885250";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Correctif Windows XP - KB885835";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Correctif Windows XP - KB885836";;;;;;;;
DK4408XP0016,108081520001,"GAILLARD Alain",11014,"Correctif Windows XP - KB886185";;;;;;;;
我以前从未使用过 Excel VBA,这是我第一次处理这个问题。我开始研究一些示例以在 Excel 中创建和运行 VBA 代码。
请有人帮我解决这个问题,我想创建 VBA 代码来提取原始数据并放入以下格式。
CompName ComputerSerial UserName EmpNo SoftwareName
DK4408XP0016 1108081520001 GAILLARD Alain 11014 LiveUpdate 3.3 (Symantec Corporation)
DK4408XP0016 1108081520001 GAILLARD Alain 11014 Adobe SVG Viewer 3.0
我检查了这个链接Code for looping through all excel files in a specified folder, and pulling data from specific cells,它有一个关于“excel loop through files in folder”的信息,但这不是我要找的。p>
我想,我需要在这里做的,从文件中删除像, "" ;这样的特殊字符,然后格式化。我根本不知道该怎么做。
是否有任何工具可以从 .CSV 文件中提取数据???我需要一些建议、想法或一些好的例子来解决我的问题,这对我很有帮助。
我在这里分享我的一个文件:http://uploadmb.com/freeuploadservice.php?uploadmbID=1323960039&srv=www&filename=4408_NANTES_softwares.csv
【问题讨论】:
-
您的示例文件的格式与您在此处发布的格式不太一样:
Comp;uter;"Name,""";Computer;Seria;"l"",""User";"name"",""Employee";"Number"",""Software";"name""" "DK4408XP0016,108081520001,""GAILLARD Alain"",11014,""LiveUpdate 3.3 (Symantec Corporation)""";;;;;;;;那么它是哪一个?? -
@ Jean-François Corbett:你是对的。我有很多这样的文件。现在我已将示例添加到问题中。