Delineate data in exported CSV

Hi everybody,
I hope this is a fairly simple query. I have a form with a table intended for collecting certain data. The columns represent different fields I need info for. The rows would be the data from different sources. So the columns are things like name, email, phone number etc. Each row in the form is data collected from a different person.
When I export the collected data as a CSV, instead of (for instance) all the email addresses being displayed one underneath the other in a single column, all the fields are their own column, so I end up with columns called name, email, phone number, each with one entry below them which is the data from the first row in the form. The columns start again with name, email, phone number and the data collected in the second row appears in these columns. And so it carries on across the excel sheet.  With some copying and pasting the fields can all be put correctly one under the other, but is there a way to specify this in the form setup?
We want to use the captured data for upload into our CRM software and it's a pain to have to sort the sheets first. It has a uploader function so as long as the CSV only has one column for each field but all entries are stacked in that column it will import
Thanks and hope question is clear enough
Darren

Every carriage return that you have in a jsp gets turned into a carriage return in the output.
For instance just these standard codes:
<%@ page import="java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>Result in 3 blank lines at the start - because there is a carriage return outside of tags
For generating HTML thats fine - it ignores all those carriage returns.
For generating CSV thats not so good.
To eliminate all the blank lines, you have to write code more like this
<%@ page import="java.util.*"
%><%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"
%>Note that the carriage returns all occur inside a JSP tag - that way they don't get translated into the HTML.
Better option is to generate the CSV in a servlet rather than a JSP :-)
Cheers,
evnafets

Similar Messages

  • HT2486 how can I export the contact book data to a csv file for editing?

    how can I export the contact book data to a csv file for editing?

    You can edit a card right in Contacts. No need to export and re-import.
    Select a name and on the right side, click the Edit button:

  • How can we export table data to a CSV file??

    Hi,
    I have the following requirement. Initially business agreed upon, exporting the table data to Excel file. But now, they would like to export the table data to a CSV file, which is not being supported by af:exportCollectionActionListener component.
    Because, when i opened the exported CSV file, i can see the exported data sorrounded with HTML tags. Hence the issue.
    Does someone has any solution for this ... Like, how can we export the table data to csv format. And it should work similar to exporting the data to excel sheet.
    For youre reference here is the code which i have used to export the table data..
    ><f:facet name="menus">
    ><af:menu text="Menu" id="m1">
    ><af:commandMenuItem text="Print" id="cmi1">
    ><af:exportCollectionActionListener exportedId="t1"
    >title="CommunicationDistributionList"
    >filename="CommunicationDistributionList"
    >type="excelHTML"/> ---- I tried with removing value for this attribute. With no value, it did not worked at all.
    ></af:commandMenuItem>
    ></af:menu>
    ></f:facet>
    Thanks & Regards,
    Kiran Konjeti

    Hi Alex,
    I have already visited that POST and it works only in 10g. Not in 11g.
    I got the solution for this. The solution is :
    Use the following code in jsff
    ==================
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="text/csv; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    OR
    <af:commandButton text="Export Data" id="ctb1">><af:fileDownloadActionListener contentType="application/vnd.ms-excel; charset=utf-8"
    >filename="test.csv"
    >method="#{pageFlowScope.pageFlowScopeDemoAppMB.test}"/>
    ></af:commandButton>
    And place this code in ManagedBean
    ======================
    > public void test(FacesContext facesContext, OutputStream outputStream) throws IOException {
    > DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    >DCIteratorBinding itrBinding = (DCIteratorBinding)dcBindings.get("fetchDataIterator");
    >tableRows = itrBinding.getAllRowsInRange();
    preparaing column headers
    >PrintWriter out = new PrintWriter(outputStream);
    >out.print(" ID");
    >out.print(",");
    >out.print("Name");
    >out.print(",");
    >out.print("Designation");
    >out.print(",");
    >out.print("Salary");
    >out.println();
    preparing column data
    > for(Row row : tableRows){
    >DCDataRow dataRow = (DCDataRow)row;
    > DataLoaderDTO dto = (DataLoaderDTO)dataRow.getDataProvider();
    >out.print(dto.getId());
    >out.print(",");
    >out.print(dto.getName());
    >out.print(",");
    >out.print(dto.getDesgntn());
    >out.print(",");
    >out.print(dto.getSalary());
    >out.println();
    >}
    >out.flush();
    >out.close();
    > }
    And do the following settings(*OPTIONAL*) for your browser - Only in case, if the file is being blocked by IE
    ==================================================================
    http://ais-ss.usc.edu/helpdoc/main/browser/bris004b.html
    This resolves implementation of exporting table data to CSV file in 11g.
    Thanks & Regards,
    Kiran Konjeti

  • How to export data to multiple csv files?

    Hey Scripting Guys,
    As stated by the name I'm a novice at scripting.  Typically I'm able to resolve most of my scripting challenges by reading through your site or scouring the internet.  This challenge I haven't been able to resolve.  Please help!!
    I'm running a script (posted below) to grab data and export it to a csv file.  My challenge is that I want to run the script daily via task manager and have it create a new csv file either daily or weekly.  I'm having trouble with the scripting
    creating a new csv file.  How do I resolve this?  
    It would be beneficial to append the date to a standard file name, ex. c:\exportedcsv7-11-2014.csv; the next day it would be c:\exportedcsv7-12-2014.csv; and so on.
    Thank you in advance to any assistance.
    Respectfully,
    ScriptingNovice
    Get-Datastore -Name "*DS*" | Sort $_.name | Get-View | Select -ExpandProperty Summary | `
    Select Name,
    @{N=”FreeSpaceGB”;E={[Math]::Round($_.FreeSpace/1GB,2)}},
    @{N=”CapacityGB”; E={[Math]::Round($_.Capacity/1GB,2)}},
    @{N=”UncommittedGB”; E={[Math]::Round($_.Uncommitted/1GB,2)}},
    @{N=”ProvisionedGB”;E={[Math]::Round(($_.Capacity – $_.FreeSpace + $_.Uncommitted)/1GB,2)}},
    @{N=”Over-Provisioned-DS”;E={([Math]::Round($_.Capacity/1GB,2)) – ([Math]::Round(($_.Capacity – $_.FreeSpace + $_.Uncommitted)/1GB,2))}}| `
    select Name,CapacityGB,FreespaceGB,ProvisionedGB,UncommittedGB,Over-Provisioned-DS | export-csv -notype c:\vmds.csv

    Thank you for the information and the tip.  I took your advice and did some research on Strings, something that I do have trouble grasping.  I'm familiar with variables already and feel comfortable using them.  I also need to study .Net which
    I totally don't understand. 
    Since I appreciate your advice and guidance I'd like to know if I'm on the correct track.  Please look at my breakdown to see if I'm explaining it correctly.
    $d=Get-Date
    Here a variable is being created using the Get-Date cmdlet, if we execute $d the date will appear
    $d.ToString('dd-MM-yyyy')
    This converts the date into the format dd-MM-yyyy.
    I took the information and tips you provided then came up with this after reading about strings.
    export-csv -notype "c:\folder\vmds_$($d.ToString('MM-dd-yyyy')).csv"
    The double quotes evaluate the variables.  The single quotes do not evaluate anything they just show what's inside of them (a.k.a. literal string). The $() evaluate the expression in ('MM-dd-yyyy') before writing it.
    You are correct I definitely need to strengthen the foundation of my basics.  Thank you for the direction and advice.

  • Exporting table data to a CSV file

    hello everyone,
    i need help on exporting table data to a CSV file.
    I have a div element containing the table which displays some data.
    there is a "Export" button just above the table, which if clicked, will export the current data in the table to a .csv file.
    can this be done in jsp? or i need to use servlet?
    also how can i submit the table data only? (as my webpage contiain other data also)
    can anyone provide with some sort of sample code?
    thanks in advance!!

    oops!!
    i just forgot..
    when the user will click on the export button, i want to greet him with a "Save As"
    popup, so that he can specify the filename and location to save the file.
    thanks!!

  • How to export out the date into the csv file?

    Hi, I had been trying to export out the value of the date to csv file.
    This is the  script:
    $strADPath = 'LDAP://dc=test,dc=com'
    function ConvertLargeIntegerToDate([object]$LargeInteger){
    try
    $int64 = ConvertLargeIntegerToInt64 ($LargeInteger)
    if ($int64 -gt 0)
    $retDate = [datetime]::fromfiletime($int64)
    else
    $retDate = $null
    return $retDate
    catch
    return $null
    $objSearch = New-Object DirectoryServices.DirectorySearcher
    $objSearch.Filter = '(&(objectClass=user)(samaccountname=user1))'
    $objSearch.SearchRoot = $strADPath
    $objSearch.PageSize = 1000
    $objSearch.SearchScope = "subtree"
    $objResults = $objSearch.Findall()
    $dateAccountExpires = ConvertLargeIntegerToDate $objUser.accountexpires[0]
    Write-Host "date Account expires: " $dateAccountexpires
    $objResults| ForEach-Object{
    $_.GetDirectoryEntry()
    } |
    Select-Object -Property @{Name="sAMaccountName";Expression={$_.sAMAccountName}},
    @{Name="cn";Expression={$_.cn}},
    @{Name="name";Expression={$_.name}},
    @{Name="manager";Expression={$_.manager}},
    @{Name="givenName";Expression={$_.givenName}},
    @{Name="accountExpires";Expression={$_.dateAccountExpires}},
    @{Name="department";Expression={$_.department}} |
    Export-Csv -Path 'D:\test44.csv'
    This is what I get in PowerShell ISE:
    This is what I had get for the csv file for the expire date:

    hi FWN,
    the code had giving me error saying that it could not call method on a null-value expression.
    $temp = $_.Properties
    the code had gave error saying that it could not call method on a null-value expression.
    $properties | %{ $res.$_ = $temp.Item($_) }
    the code had gave error saying that it could not call method on a null-value expression.
    with lot of thanks
    noobcy

  • Export Of Data In The .CSV Format With Column Headings On Top

    I'm trying to export data in the .csv format from a report (Crystal Reports XI Release 2).  When I export the data, the heading appears in the first few columns on the left hand side (i.e. columns "A" thru "G") for every row, rather as a column heading on top.  These header describe the data beneath it.  I tried various combinations of export options.  The file needs an extension .csv (or .xls) for the tool that uses the data.  Any suggestions how I can accomplish this ?

    Abhishek,
    I tried to apply your solution, but forgot that the Crystal Reports support desk updated my version of Crystal Reports XI to Release 2 for a previous problem.  My CDs are Crystal Reports XI Release 1.  Now I can't export at all until I figure out how to turn on the export option.  I do have access to older version (version unknown) that came with one of business system.  The options it has are "Character", "Tab", and "Delimeter" for "Separated Values (CSV)".  It does not have the option that you mentioned.  Is there a similar option with this older version ?  Lastly, How can I turn on the "Export" for "Crystal Reports XI Release 2" ?  Thanks ! ! !

  • Which version of the Forms Central subscription will allow me to export data to excel (CSV file)?

    Which version of the Forms Central subscription will allow me to export data to excel (CSV file)?

    Hi Heather 349
    I believe you can do it with both FormsCentral Basic and FormsCentral PLUS
    Also Refer : Tutorial: Exporting Responses to Excel, CSV or PDF

  • Whenever I try to export my form data into a csv it is not formatted correctly

    Whenever I try to export my data into a CSV and open it in notepad it does not place each row on a seperate line. Is there any way to insert a return at the end of the form or data so that each row is on a seperate line?

    FormsCentral produces CVS files that use CR (Carriage Return) as the row delimiter.  NotePad requires CRLF (Carriage Return + Line Feed).  If you use a different text editor (WordPad, NotePad++) you will find each record on its own line (assuming you do not have word wrap enabled).

  • Import CSV, Edit Data, Export CSV

    Hello,
    I am a powershell novice and have been given a task to complete. I need to scan through AD, find all of the servers that are supposed to be active, "ping" them and, if active, get their IP address and verify that a number of services are running.
    Once all of the data is collected, I need to write all of this out to a .CSV file. So far, what I have is this:
    Using Import-Module ActiveDirectory, I am able to get the full list of servers with appropriate information and export that to a CSV
    I import the CSV file above back in and create new headers (columns) for more information
    The full list of servers are pinged individually. If pingable, I get the IP address and service information needed
    Where I am stuck is writing all of this back out to a .CSV file. Right now, I am just writing the information back out to the screen for verification. I'm sure it's something small, but being a novice I'm not sure where to go. Any help?

    Here is the full code. The Write-Host statements are just for me during the testing to see if the information is correct. The last statement was what I tried to write the information out, but it came up empty and I really haven't found a way to get it to
    work.
    Import-Module ActiveDirectory    
    Get-ADComputer -LDAPFilter "(OperatingSystem=*Server*)" -Property * |
        Select-Object Name,Created,LastLogonDate,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,CanonicalName |
        ? {$_.CanonicalName -notlike "*Archived Servers*" -and $_.CanonicalName -notlike "*Sun Prod*"} |
        Export-CSV "c:\temp\AllADComputers4.CSV" -NoTypeInformation -Encoding UTF8
    #Add other headers
    $csv = get-content "c:\temp\AllADComputers4.CSV"
    $csv[0] += ",Pingable,IPAddress,SCCM Status,AV Name,AV Version,AV Status"
    $csv | out-file "c:\temp\AllADComputers4.CSV"
    $MachineInfo = Import-Csv -Path "c:\temp\AllADComputers4.CSV"
    $Processed = ForEach ($objitem in $MachineInfo)
        If (Test-Connection -ComputerName $Objitem.Name -Quiet -Count 1)
            If (Get-Service -name "Symantec AntiVirus" -computername $Objitem.Name)
                $AVStatus = Get-Service -name "Symantec AntiVirus" -computername $Objitem.Name
                $AVName = "Symantec AntiVirus"
            Elseif (Get-Service -name SepMasterService -computername $Objitem.Name)
                $AVStatus = Get-Service -name SepMasterService -computername $Objitem.Name
                $AVName = SepMasterService
            ElseIf (Get-Service -name "Norton AntiVirus Server" -computername $Objitem.Name)
                $AVStatus = Get-Service -name "Norton AntiVirus Server"-computername $Objitem.Name
                $AVName = "Norton AntiVirus Server"
            Else
                $AVStatus = "Stopped"
                $AVName = "None"
            $SCCMAgentStatus = Get-Service -name ccmexec -computername $Objitem.Name
            $Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $Objitem.Name | ? {$_.IPEnabled}
            $objitem.Pingable = "Yes"
            foreach ($Network in $Networks)
                    $IPAddress  = $Network.IpAddress[0]
            Write-Host $Objitem.Name,"...Success...",$IPAddress,"   SCCM Status = ",$SCCMAgentStatus.Status, "Anti-Virus = ",$AVName, "Status = ",$AVStatus.Status
            $service = gwmi -computername $objItem.Name -class Win32_Service | ? {$_.Name -eq $AVName}
            $path = ($service | Select -Expand PathName)
            $path = $path.Replace(":","$")
            $path = $path.Replace('"','')
            $FullPath = "\\"+$objitem.Name+"\"+$path
            $ver = Get-ItemProperty -Path $FullPath | select-object -expand VersionInfo | select-object -expand ProductVersion
            Write-Host $Fullpath
            Write-Host "Version = ",$ver
        Else
            Write-Host $Objitem.Name"...Failed"
            $objitem.Pingable = "No"
    $Processed | export-csv -Path "c:\temp\AllADProcessed.CSV"

  • Create export-csv with dynamic (unknown amount) columns

    Hi,
    This is my first post, hopefully I include everything you need.  My code block is at the bottom of my post.....
    I have written a PS script that gives me the info I need, but I would like to format it differently.  Currently I import a CSV with 2 columns - username and print queue name.  The script then takes each username and looks it up in SCCM
    to find the workstations the username has logged into.  I then export to csv - this is where I would like to format it differently.  The export csv has 4 columns username, print queue name, workstation name, and details. 
    username1,printqueue,workstation1,details
    username1,printqueue,workstation2,details
    username2,printqueue,workstation1,details
    username2,printqueue,workstation2,details
    My problem is that if the user logs into 5 workstations I have 5 rows with duplicated username and print queue name.  If my next username logs into 8 workstations I have 8 rows, etc.  I would like to format the export dynamically using as many
    columns (not rows) as need.  For example
    username1, printqueue,workstation1,workstaion2, workstation3
    username2,printqueue,workstation1,workstation2, workstation3,workstation4
    I expect where I have my pscustomobject would be where I could change this - I have tried setting up a count variable and using that in my loop to be able to assign dynamic column name, I have tried using an array but still new to setting that up, maybe
    I just wasn't doing it correctly.  If anyone has any ideas that would be great.
    Thanks, Kevin
    Here is my code:
    #Declare variables
    $now = Get-date
    $date = get-date -uformat "%Y_%m_%d_%I%M%p"
    $Queues = Import-Csv "c:\Users.csv"
    $SiteName="XXX"
    $SCCMServer="your.sccm.server.com"
    $SCCMNameSpace="root\sms\site_$SiteName"
    $CSVPath1 = "c:\PrinterUsersByComputer_$date.CSV"
    #Notify user that script is starting
    Write-Host -ForegroundColor Green "Starting script"
    #Loop through each account and find any workstations from SCCM that the user has logged into
    foreach ($Queue in $Queues){
    $Queue.Username
    $WSs = Get-WmiObject -namespace $SCCMNameSpace -computer $SCCMServer -query "select Name from sms_r_system where LastLogonUserName = '$($queue.username)'" | Select-Object -ExpandProperty Name
    #Check if the workstation variable has data
    if ($WSs){
    foreach ($WS in $WSs) {
    #Check if workstation is ALIVE and if we have access to it to get OS version
    $rtn = (Test-Connection -Cn $WS -BufferSize 16 -Count 1 -Quiet)
    IF ($rtn -match 'True') {
    $OS = Get-WmiObject Win32_OperatingSystem -ComputerName $WS | Select-Object -ExpandProperty Caption -ErrorAction Stop
    #Write to screen device to show progress
    Write-Host -ForegroundColor Green "Computer information found: $WS"
    #Write to log file the username, workstation(s) logged into, and OS version
    [PSCustomObject] [Ordered] @{
    'UserName' = $Queue.Username
    'Print Queue' = $Queue.PrintQueue
    'ComputerName' = $WS
    'Operating System' = $OS
    } | Export-Csv $CSVpath1 -Append -NoTypeInformation

    Ok, just a sec, I'm not sure we are on the same page.  I don't think that isn't what I'm look for. Unless I'm missing something, your code above assume 4 workstation columns for every row.  What if there is 5 or 8.  My current output
    from the full script is this (based on checking if PC is pingable, whether I'm denied the WMI query, etc)
    UserName
    Print Queue
    ComputerName
    Operating System
    User1
    PQ1
    Computer1
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer2
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer3
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer4
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer5
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer6
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer7
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer8
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer9
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer10
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer11
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer12
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer13
    No device name to query
    User1
    PQ1
    Computer14
    Microsoft Windows 7 Enterprise 
    User2
    PQ2
    Computer15
    Microsoft Windows 7 Enterprise 
    User3
    PQ3
    Computer1
    Microsoft Windows 7 Enterprise 
    User4
    PQ4
    Computer2
    Access denied connecting to device.    No access to it: Computer2
    What I would really like is this, getting rid of the OS name for now:
    User1
    PQ1
    Computer1
    Computer2
    Computer3
    Computer4
    Computer5
    User2
    PQ3
    Computer1
    User3
    PQ13
    Computer1
    Computer2
    I would just like to condense the workstations to columns instead of 1 workstation per row and be able to expand the # of columns required based on the amount of workstations in $WSs -

  • Data Migration from CSV file to Database Table.

    Hi,
    I have checked few answered threads on Data Migration Issues but didn't find the solution yet.
    I am reading data from an CSV file to internal table but the complete row is coming under one field of the internal table.
    How i can get values in different fields of the internal table from the CSV file ?
    Thanks & Regards.
    Raman Khurana.

    Hi,
    If you are using GUI_UPLOAD, you might have missed to make has_field_separator  as 'X'.
      EXPORTING
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       filename                      = 'C:\File.csv'
       filetype                      = 'ASC'
       has_field_separator           = ' X'  "<= Set this as 'X'.
      TABLES
        data_tab                      = itab.
    Regards,
    Manoj Kumar P

  • How can I import data from a csv file into databse using utl_file?

    Hi,
    I have two machines (os is windows and database is oracle 10g) that are not connected to each other and both are having the same database schema but data is all different.
    Now on one machine, I want to take dump of all the tables into csv files. e.g. if my table name is test then the exported file is test.csv and if the table name is sample then csv file name is sample.csv and so on.
    Now I want to import the data from these csv files into the tables on second machine. if I've 50 such csv files, then data should be written to 50 tables.
    I am new to this. Could anyone please let me know how can I import data back into tables. i can't use sqlloader as I've to satisfy a few conditions while loading the data into tables. I am stuck and not able to proceed.
    Please let me know how can I do this.
    Thanks,
    Shilpi

    Why you want to export into .csv file.Why not export/import? What is your oracle version?
    Read http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php
    Regards
    Biju

  • How to export csv without doublequote

    I ran the following comand
    ls |export-csv "d:\a.csv"
    The result is like the following, every field is double quoted, is there any way to not export double quote. Currently the silly approach I used is to first export-csv, and then read the file in and replace all the double quote with empty string.
    #TYPE System.IO.DirectoryInfo
    "PSPath","PSParentPath","PSChildName","PSDrive","PSProvider","PSIsContainer","BaseName","Mode","Name","Parent","Exists","Root","FullName","Extension","CreationTime","CreationTimeUtc","LastAccessTime","LastAccessTimeUtc","LastWriteTime","LastWriteTimeUtc","Attributes"
    "Microsoft.PowerShell.Core\FileSystem::C:\Users\Daniel.Wu\.fcm","Microsoft.PowerShell.Core\FileSystem::C:\Users\Daniel.Wu",".fcm","C","Microsoft.PowerShell.Core\FileSystem","True",".fcm","d----",".fcm","Daniel.Wu","True","C:\","C:\Users\Daniel.Wu\.fcm",".fcm","10/6/2010
    10:33:39 AM","10/6/2010 2:33:39 AM","10/15/2010 3:28:57 PM","10/15/2010 7:28:57 AM","10/15/2010 3:28:57 PM","10/15/2010 7:28:57 AM","Directory"

    This really is a typical "Microsofty" reply. Yes, it's good practice to quote strings that may contain special characters or even commas within the fields. But if you know your data and you also know that there will be no such issues, then it's
    completely unnecessary.
    There is no formalised standard for CSV yet. RFC 4180 is a proposed standard, and even it says that strings
    may be quoted. The exception is for strings that actually contain commas.
    What gets up my nose is when MS fail to present a reasonable option (e.g. a "-noquote" switch), and then attempt to justify it by saying it
    should be the standard.
    CSV is a flexible format, and I should be able to output as TSV (which I can, thanks, Microsoft) and refrain from quoting my data as I see fit. Yes, I can roll my own using Add-Content, but when you have something like Export-CSV that implies it'll support
    the usual options (no quotes unless specified), it's frustrating.
    If you feel that strongly, add a suggestion on Connect. That stands a much better chance of being seen by someone who might be able to implement your suggestion than randomly complaining in an old, answered thread.
    https://connect.microsoft.com/
    EDIT: I just re-read my post and I want to clarify that I'm not trying to be argumentative with this suggestion.
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • Help with Export-CSV commandlet

    Hello, I have a basic powershell command that I want to execute and export the data to a CSV file.  If I execute the command and have the output go to a .txt file (using Out-File c:\output.txt) the command works perfectly. But when I use the Export-CSV
    c:\output.csv all I get is the following:
    #TYPE Microsoft.PowerShell.Commands.Internal.Format.FormatStartData
    "ClassId2e4f51ef21dd47e99d3c952918aff9cd","pageHeaderEntry","pageFooterEntry","autosizeInfo","shapeInfo","groupingEntry"
    "033ecb2bc07a4d43b5ef94ed5a35d280",,,,"Microsoft.PowerShell.Commands.Internal.Format.TableHeaderInfo",
    "9e210fe47d09416682b841769c78b8a3",,,,,
    "27c87ef9bbda4f709f6b4002fa4af63c",,,,,
    "27c87ef9bbda4f709f6b4002fa4af63c",,,,,
    "27c87ef9bbda4f709f6b4002fa4af63c",,,,,
    "27c87ef9bbda4f709f6b4002fa4af63c",,,,,
    "27c87ef9bbda4f709f6b4002fa4af63c",,,,,
    "4ec4f0187cb04f4cb6973460dfe252df",,,,,
    "cf522b78d86c486691226b40aa69e95c",,,,,
    The command I am attempting to use is:
    Get-ADUser –Filter * -SearchBase “OU=OU3,OU=OU2,OU=Departments,OU=OU1,DC=gf,DC=local” | FT Name,SamAccountName | Export-CSV c:\DETfac.csv
    The command also works if I don't specify the fields that I need exported.  As soon as I add the name and samAccountname, I get the output above.  Any assistance would be greatly appreciated

    Hi,
    Replace FT with Select and you should be fine. You may want to add in -NoTypeInformation to Export-Csv as well.
    EDIT: Hah, slow again. =]  See above.
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

Maybe you are looking for

  • Issue to load data from database to XML file. error: ODI-40768

    Hi, While I am trying to load data from database to XML following error is appearing. ODI-1228: Task TEST_XML_DATA (Integration) fails on the target XML connection MyLOCALXSD. Caused By: java.sql.SQLException: ODI-40768: Could not save the file <defa

  • Nobody answering my question,Please reply its very urgent???

    Hello Experts, I want to fecth the Supplier information from SAP server to PDM server (non sap) using RFC call.But the LFA1 have some customised fields.. 1) I want the RFC or BAPI which Gives the supplier details with customised fields in LFA1. 2) Ho

  • Gaming 7 - flashing blue led.

    I recently build a computer and everything was working fine until yesterday when the computer wouldn't start. When pressing the power button normally nothing would happen but when pressed down for a while, a blue LED on the motherboard (under the MSI

  • The middle button to change screens does not operate.  How to fix?

    the middle button to change screens does not operate.  How to fix?

  • HT5628 How do I read OSX partition from Windows?

    I am thinking of installing Windows 8 on my Macbook Pro using Boot Camp to create a dual boot system. If I do this, how can I access my current Mac OSX partition from within Windows? Does boot camp mount the Mac OSX partition automatically? If not, h