New PrimalToys object for easier CSV handling
With service build 569 of PrimalScript 2007 we added a COM object that makes it easier to deal with CSV (comma separated values) data and/or files.
While browsing through posts at ScriptingAnswers.com and some of Microsoft’s scripting related newsgroups I couldn’t help but notice that questions regarding CSV keep coming up.
I mentioned this to one of our engineers, Stephen Poon, and he created this object that can edit and display CSV files really easily.
The following script is a PowerShell sample, a VBScript sample is included with PrimalScript 2007 (any edition) and the free PrimalToys download at our Free Tools Site
$CSVEdit = New-Object -comObject “SAPIEN.CSVEditor”
$CSVEdit.FirstRowColumnNames = $True
$CSVEdit.DataStartRow = 1
$CSVEdit.ReadOnly = $True
$CSVEdit.Title = “Current Processes Summary”
$CSVEdit.Label=”Processes:” #Text Label for the Grid
get-process | Export-Csv “C:\Temp\process.csv”
$CSVEdit.FileName = “C:\Temp\process.csv”
$CSVEdit.LoadFile()
$CSVEdit.ShowDialog()
Running this will produce this dialog:
The object includes a number of methods to insert, remove, extract columns rows or fields with or without displaying the UI.
Check it out and head over to our Free Tools forum at
http://support.sapien.com/forum/forum_topics.asp?FID=10
and let us know what you think and if there is anything we should add.
Tags: powershell, PrimalScript, PrimalToys, SAPIEN, scripting, VBScript








August 30th, 2008 at 9:47 pm
I do not believe this
October 17th, 2008 at 6:50 pm
[...] >> csv EasyCatalog connects InDesign to ODBC database Saved by Phoenix25 on Thu 16-10-2008 New PrimalToys object for easier CSV handling Saved by fenec on Thu 16-10-2008 CSV Import Saved by pgoerner on Wed 15-10-2008 Shareasale [...]