Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
04-13-2012, 02:17 PM #1
- Join Date
- May 2011
- Thanked 0 Times in 0 Posts
How to add "Filter" and Delete columns and rows in CSV/XLS via VBScrip
Could you help me.
I have some report and I need to Open csv/xls and than:
1. delete first row
2. delete some columns
3. add 3 kolumn names
Could you help me ? (it needs to be a function)
I now hot to do it in VBA but I don;t have idea how to to it in VBS
I Have some code:
Function OK() Const ForReading = 1 Const ForWriting = 2 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("c:\CSVFiles\Rapport.csv", ForReading) (...) objFile.Close Set objFile = objFSO.OpenTextFile("c:\CSVFiles\Text.csv", ForWriting) objFile.Write strNewContents objFile.Close End Function
Last edited by Leos; 04-13-2012 at 02:25 PM.