![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Custom Delimiters ? Hi I have an query that run against SQL Server and returns a DataSet, I can output the results to a csv file using, $Results.tables[0] | Export-Csv ("c:\test.csv") Some of the columns have dollar amounts e. Jim, money, $1,400 and that is interpreted incorrectly in excel. Is there a way to specify an alternative delimiter like | a pipe, so that it appears as Jim| money| $1,4000 with the $1,400 intact ? Thanks. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Custom Delimiters ? dm_14 wrote: Quote: > Hi > > I have an query that run against SQL Server and returns a DataSet, I can > output the results to a csv file using, > > $Results.tables[0] | Export-Csv ("c:\test.csv") > > Some of the columns have dollar amounts e. Jim, money, $1,400 and that is > interpreted incorrectly in excel. Is there a way to specify an alternative > delimiter like | a pipe, so that it appears as Jim| money| $1,4000 with the > $1,400 intact ? > > Thanks. > which allows for using something other than "," to seperate stuff. So this would work: PSHv2 CTP2> $results.tables[0]|export-csv -delimiter "|" c:\test.csv Willing to try CTP2 on a non-production machine? If not, there should be another method... Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Custom Delimiters ? Quote: > Is there a way to specify an alternative > delimiter like | a pipe, IIS's Microsoft's (local or remote) data parser, Log Parser 2.2 (with built-in Microsoft ChartSpace chart maker) can do what one wants! -o:tsv -oSeparator:"|" PowerShell users use Log Parser just like PowerShell users use IE, ChartSpace, Excel, Word, NetStat.exe or MSBuild.exe or WinRM and so on! Notice: IIS does not need to be running or installed in order to use Log Parser for either data parsing or chart making. Search the Internet (and this newsgroup) for usage of: Microsoft's Log Parser command line usage, or fully script enabled either in COM or .NET (from the IIS group) Remember, ever since PowerShell added HTTP / HTTPS usage (like IIS) Log Parser became PowerShell's data parser (like Log Parser is for IIS) too! |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Custom Delimiters ? Hi Flowering Weeds, Could you please provide a short working example ? Thanks. "Flowering Weeds" wrote: Quote: > Quote: > > Is there a way to specify an alternative > > delimiter like | a pipe, > Yes, the Windows data parsing tool, > IIS's Microsoft's (local or remote) data > parser, Log Parser 2.2 (with built-in > Microsoft ChartSpace chart maker) > can do what one wants! > > -o:tsv -oSeparator:"|" > > PowerShell users use Log Parser > just like PowerShell users use IE, > ChartSpace, Excel, Word, NetStat.exe > or MSBuild.exe or WinRM and so on! > > Notice: IIS does not need to be running > or installed in order to use Log Parser > for either data parsing or chart making. > > Search the Internet > (and this newsgroup) > for usage of: > > Microsoft's Log Parser > command line usage, > or fully script enabled > either in COM or .NET > (from the IIS group) > > Remember, ever since PowerShell > added HTTP / HTTPS usage (like IIS) > Log Parser became PowerShell's data > parser (like Log Parser is for IIS) too! > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Custom TraceListener using custom LogEntry | .NET General | |||
| Accessing custom types output from custom cmdlet's in C# GUI | PowerShell | |||
| Word Delimiters or Separators. Where defined? | Vista General | |||
| types.custom.ps1xml for custom members | PowerShell | |||