Import from dsv files and export to csv files

hi every body..
how can I create a project in NetBeans which does:
1- import a .dsv (Delimiter-Separated Values) file content and save it to array
- the values in this format separated by fixed commas
example
"AIG" "Insurance" "64.91" "25/11/06"
2- export into .csv file (Comma Separated Value)
-the values in this format separated by commas
example:
AIG,Insurance,64.91,25/11/06

Well, you need to learn Java so you can read files, divide the data by the delimiters, and then write it out as a csv file.
Can't really give better instructions than that...maybe start by reading the basic tutorials?
We don't give out full program code here so you'll need to ask more precise questions. Such as what is it that you're having problems with.

Similar Messages

  • How to Query remote PC's registry by OU for 2 values and export to CSV file.

    I'm new to scripting and to Powershell but this is what I have managed to put together so far. Of course it fails. We have two custom entries in the registry that I want to query remote workstations for these values, Monitor 1 and Monitor 2. Output to a
    CSV along with the workstations name. Because of our AD structure I figured its just easier to input the OU individually as seen in the script. That portion of the script seems to work. I get the following error in bold when I run the script: I've Google'd
    and tinkered with this for a week now with no resolution and seem to be going in circles.  And yes, I had help to get this far.
    Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found.
    At C:\utils\RegMonitor2.ps1:33 char:5
    +     $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive,$result.pro ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IOException
    Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found.
    At C:\utils\RegMonitor2.ps1:33 char:5
    +     $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive,$result.pro ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IOException
    # 1) Searches Active Directory for all Computers under said OU
    # 2) Searches remote registry of those machines for the mentioned Monitor and Monitor2 subkeys.
    # 3) Exports CSV (Can be opened and saved as excel format later) with ordered columns Computername, Monitor1 value, monitor2 value.
    # ================================================================
    $SearchPath = "OU=XXX,OU=XXX,OU=XXX,DC=XXX,DC=XXX,DC=XXX"
    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher
    $objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry("LDAP://$SearchPATH")
    $objSearcher.PageSize = 1000
    $objSearcher.Filter = "(objectClass=computer)"
    $objSearcher.SearchScope = "Subtree"
    $colProplist = "name"
    $colResults = $objSearcher.FindAll()
    $Store = @()
    $Hive = [Microsoft.Win32.RegistryHive]"LocalMachine";
    foreach ($result in $colResults)
    # Use $result.properties.name to retreive ComputerName
    $obj = New-Object PsObject
    $obj | Add-member -type noteproperty -name "Computername" -Value $result.properties.name
    $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive,$result.properties.name);
    $ref = $regKey.OpenSubKey("SYSTEM\CurrentcontrolSet\control\Session Manager\Environment");
    $obj | Add-member -type Noteproperty -name "Monitor1" -value $ref.OpenSubKey("Monitor")
    $obj | Add-member -type Noteproperty -name "Monitor2" -value $ref.OpenSubKey("Monitor2")
    $store += $obj
    $store | Select-Object Computername,Monitor1,Monitor2 | Export-CSV -noTypeInformation -Path "Pathtosave.csv"
    People are always promising the apocalypse. They never deliver.
    Ok, I have modified the end of the script a bit, and no more error: Instead I get an unexpected output.
    foreach ($result in $colResults)
        # Use $result.properties.name to retreive ComputerName
        $obj = New-Object PsObject
        $obj | Add-member -type noteproperty -name "Computername" -Value $result.properties.name
        $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive,$result.properties.name);
        $ref = $regKey.OpenSubKey("SYSTEM\CurrentcontrolSet\control\Session Manager\Environment");
        $obj | Add-member -type Noteproperty -name "Monitor1" -value $ref.OpenSubKey("Monitor")
        $obj | Add-member -type Noteproperty -name "Monitor2" -value $ref.OpenSubKey("Monitor2")
        $store += $obj
    $store | Select-Object Computername,Monitor1,Monitor2 | Export-CSV -noTypeInformation -Path "C:\Utils\Data.csv"
    Unexpected output:
    "Computername","Monitor1","Monitor2"
    "System.DirectoryServices.ResultPropertyValueCollection",,
    "System.DirectoryServices.ResultPropertyValueCollection",,
    "System.DirectoryServices.ResultPropertyValueCollection",,

    Hi,
    What do your registry values look like in the Monitor and Monitor2 subkeys?
    EDIT: This might help:
    # Retrieve list of computers using Get-ADComputer and process each
    Get-ADComputer -Filter * -SearchBase 'OU=Test PCs,DC=domain,DC=com' | ForEach {
    # Verify PC is alive
    If (Test-Connection $_.Name -Quiet -Count 1) {
    # Connect to registry
    $remoteHive = [Microsoft.Win32.RegistryHive]“LocalMachine”;
    $regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($remoteHive,$($_.Name))
    # Open the Environment key
    $ref = $regKey.OpenSubKey('SYSTEM\CurrentcontrolSet\control\Session Manager\Environment')
    # Create an ordered hashtable with the data from string values named 'String Value One/Two' in Monitor and Monitor2 subkeys
    # You'll need to adjust these values based on your actual data
    # If you are running v2, remove [ordered] below (so the line reads $props = @{)
    $props = [ordered]@{
    Computer=$_.Name
    Monitor =$ref.OpenSubKey('Monitor').GetValue('String Value One')
    Monitor2=$ref.OpenSubKey('Monitor2').GetValue('String Value Two')
    # Create a custom object based on the hashtable above
    New-Object PsObject -Property $props
    } | Sort-Object Computer | Export-Csv .\MonitorRegistryCheck.csv -NoTypeInformation
    # The line above sorts the output object by the computer name and then exports the object to a CSV file
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • ¿How to get activities templates collection from sr template and export to csv using powershell?

    Hi friends.
    I want to build a script that obtains the collection of activities templates from a sr template (filtering the sr template by displayname)  and export the list (template activities displaynames) to csv file.
    Thanks for advance.
    Cheers

    Import-Module SMLets -Force
    $templateName =  "SS-Internas" 
    $template = Get-SCSMObjectTemplate -DisplayName $templateName
    $templateAct = $template.ObjectCollection.PropertyCollection | Where { $_.Path  -eq '$Context/Property[Type=''CustomSystem_WorkItem_Library!System.WorkItem'']/Title$'}
    $report=@()
    foreach($value in $templateAct.MixedValue){
    $obj = New-Object PSObject -Property @{
    "DisplayName" = $value 
    $report += $obj
    $filePath = "E:\ACT_"+$templateName+".csv"
    $report | export-csv $filePath -NoTypeInformation -Encoding UTF8
    (Get-Content $filePath) | % {$_ -replace '"', ""} | out-file -FilePath $filePath -Force -Encoding UTF8

  • How to restrict users from printing documents and exporting to local file

    Hi SAP gurus,
    I have two questions.
    1. How can I restrict users from printing a document? i.e. billdoc? I would like to know if I could block it though authorization. If yes, what auth obj to use?
    2. How to restrict certain users from exporting to local file? the System> List>Save-->Local File. I have tried restricting it using auth object S_GUI but it seems it is only applicable to older versions of SAP. im on ecc6.
    Thank you in advance.

    Hi,
    Check this:
    Create your own gui status and attach it to the list in the event START-OF-SELECTION.
    In the menu painter extra -> adjust template.
    Make it a list status and you will see all the standard list options appear including list->download
    Deactivate the ones you don't want. 
    If you just want to prevent users from downloading the list you can achieve this with authorization object S_GUI, activity 61. Menu option will still be there though.
    Please note that if you remove authorisation for S_GUI activity 61 then all downloads will not be possible. 
    If you just want to disable downloads only for a particular report, you can try this test program:
    Code:
    REPORT ztest. 
      DATA: PROGNAME LIKE SY-CPROG value 'Z_CHECK_AUTH', 
            FORMNAME LIKE SY-XFORM value 'F_CHECK_AUTH'.
    START-OF-SELECTION. 
        CALL FUNCTION 'SET_DOWNLOAD_AUTHORITY' 
             EXPORTING 
                  FORM    = FORMNAME 
                  PROG    = PROGNAME 
             EXCEPTIONS 
                  OTHERS  = 1.
      WRITE: / 'TEST'.
    You also need this:
    Code:
    PROGRAM z_check_auth.
    FORM f_check_auth USING pe_result TYPE i. 
      pe_result = 5. 
    ENDFORM.
    Also have a look at the exit SGRPDL00.
    Hope this helps you.
    Rgds,
    Raghu

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Good evening. When I try to rename a master file or export a master file, it only allows 9 spaces for my new name, even though Aperature 3 allows many more spaces than that for version names. This creates a lot of problems and headaches for me.

    Good evening. When I try to rename a master file or export a master file, Aperature 3 only recognizes the first 9 spaces for raw .NEF files, even though it easily uses twice that many spaces for version names. I have a system in place that works really well for me, wherein by changing the file name I can recognize what's important to me just by glancing at the file name, no matter what system it is in, I do not have to open or mouse over anything to know what the file is. My files also arrange themselves in order no matter what file system they are in. Can someone please tell me if there is a setting, or something I am doing wrong, that prevents me from using a longer Master file name. I can't be the only person who would like to have his Master File names correspond to the name that appears in the Aperature library, and would like to use at least 16 spaces (numbers, letters, etc.)
    Thanks,
    Photo Al

    Hi Frank,
    As you suggested, I am attaching several screen shots. In the first one you can see how I set up my preset. I used "Custom Name" and "Counter" with a dot between the two drag ins, followed by "D90". I also have a dot to seperate the 8 digits in the Custom Name and make it easier to read.
    I then click "OK" which takes us to the second screen shot. Here you can see that in the Example File Name everything looks perfect, and you can see I have clicked on "Apply to Master Files".
    In the third screen shot you can see that the version in my library did in fact change correctly. With the "mouse over" pop up screen you can see, however, that the Master File name was changed  to "1933.1017.NEF". It failed to carry the "12D90" and if I go to where my masters are stored that is exactly what the name was changed to.
    In the fourth screen shot I attempt to export the master. You can see how my "Version Name" is set up.
    And finally on the 5th screen shot you see in the File Name Example the name "1933.1017.NEF" once again, which when I export the master is exactly how the name will appear. Since I will export more than one file at a time , a (1) and  a (2)  etc., will appear at the end of the names because all the files are being given the same "1933.1017.NEF" name.
    I hope this reply does a better job of clarifying my problem. I am anxious to see if this is something I simply misunderstood, or if I am simply doing something wrong.
    Thanks,
    Photo Al

  • Proxy Media: Transcode Source File and Export Read File...

    Hello, I'm new to FCPX. I have a Panasonic HC-X920. When I shoot things I copy the entire folder tree to my hard drive and import from there, rather than directly from the SD card.
    I learned that FCPX "re-wraps" the truly original h.264 MTS files to "Original" h.264 MOV files. Not a huge deal, as there doesn't appear to be quality loss, and the MB/s rate is slightly higher on the MOVs. Ideally I'd be able to use the MTS files but FCP is Quicktime-based and I've decided I'm not worried about it.
    Anyway,
    My computer can't handle playing back 1080p 60fps h.264 footage. In order to have playback on an FCPX timeline, I have to transcode to either Proxy or Optimized media. Optimized, of course, takes up a ton of space, so I'm curious about using Proxy. But I want more info first.
    I'm most curious about question #1, but here are two questions:
    1.
    Let's say I transcode everything to Proxy Media upon import. When I go to share/export a final file from my timeline, which of the following does FCPX do?
    (A) Export the timeline using/reading from the lower-quality Proxy media, ignoring the Originals.
    (B) Automatically replace the Proxy media with the Original media files, and export the timeline using/reading the Original media files while ignoring the Proxies.
    (And if B is the answer, is it reading the Original MTS or Original MOV? I'd assume MOV, right?)
    Does this question make sense?
    I'll mostly be editing home movies with this, so it's not imperative that I be able to see what I'm editing in vivid detail and I can use Proxy for that to save disk space. But I DON'T want my final exports to be based on that lower-quality transcoded 422 Proxy Media; I want the proxies to be view-only, and I want the final exported quality to be based on the quality of the Original media.
    My other question:
    2. (probably not a big deal either way)
    When FCPX transcodes to Proxy and/or Optimized, is it reading from (A) the "Original" MOV files it created upon import, or (B) from the "truly original" MTS files?
    Thanks!

    Tom Wolsky, thanks for your answer.
    1. Where do I switch playback to original, in the Preferences? I'm attaching what I see in my Playback preference window. I don't see a place to switch this, am I doing something wrong?
    2. That's what I suspected, thanks for clarifying.
    Here's the screenshot I mentioned in #1:

  • How to save and open Text/csv file over APS

    Hi,
    I want to save(and open later) data from database block in text/csv file format over Application server, I did a lot of search here on Forms but didn't found a reasonable solution, Some one plz help me.
    Thanks and Regards, Khawar.

    As long as you are using the Report Generation Toolkit, there is no need to use ActiveX for the purpose of saving the Excel file -- Save Report will do that for you.  You can then export (as text) all of the Excel data and use the Write Spreadsheet File to make the .CSV file.  Here is how I would rewrite the final bits of your code --
    I cleaned up the wires around Excel Easy Table a bit.  You'll see I made a VI Icon for Replace Filename, which does (I think) a nicer job of self-documenting than showing its Label.  To make the filename, add the correct extension (.xlsx for Excel, .csv for CSV), use Build Path to combine Folder and Filename, and wire to Save Report.
    The next two functions add the Extract Everything and Write to Spreadsheet, using a Comma as a separator, which makes a CSV copy for you.
    Bob Schor

  • I'mtrying to upload my photos to shutterfly I've gone to file and export then the window gives me the option of file export webpage quicktime and slideshow .  on my macmini I have shutterfly on there also how do I get this on my new mac

    I go to file and export then a window appears with file export, webpage,quicktime and slideshow.  On my mini I have shutterfly as an option and don't remember how to do it.  What do I do to input this info so that shutterfly becomes an option

    Hi Barbara
    Are your photos in iPhoto or are you using some other Photo Software?
    The latest version of iPhoto is a lot different than iPhoto 6 for example. In iPhoto 06 you could burn the Originals from your User Picture Folder using Finder, while in iPhoto 11 it is best to burn them from within the iPhoto Application.
    Open iPhoto and select the Event(s) that you want to burn onto the CD, then select Share on the menu bar and click Burn in the drop down.
    http://www.apple.com/support/iphoto/
    Then again, maybe you got a bad batch of blank CD's and need to try another?
    Dennis

  • I get the error message in QuickTime "operation stopped the operation is not supported for this media" most times when I try and export an .AVI file as something else (.m4v). I have not touched the file in any way (no trimming, clipping or other editing)

    I get the error message in QuickTime "operation stopped the operation is not supported for this media" most times when I try and export an .AVI file as something else (e.g. .m4v). I have not touched the file in any way (no trimming, clipping or other editing), all I want QuickTime to do is export the file in a compressed format. Bizzarely, if I shutdown and open QuickTime many times I can occasionally export a clip as another format (maybe one in 10 times). I have seen that other users have had a similar problem after clipping files in QuickTime but this seems to be a slightly different bug in that all I do is open the file and then try and export the file as is - either way, this is a very annoying bug

    @Z_B-B, thank you for taking the time to respond to my cry for help. However, the link you supplied does not address the problem: I am not trying to export from Final Cut Pro to QuickTime, I am trying to export from QuickTime to the rest of the world (like people's iPhones and Ipads) in .m4v format (so I am not emailing my freinds such huge files).
    If I were to spend hundreds of Dollars on a copy of Final Pro I could export directly from there and not have to bother with QuickTime, but I do not take enough video clips to justify the cost. I must say that I never had any of these problems before I decided to switch from Snow Leopard to Mountai Lion.

  • Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?

    Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?  If so, how?

    You can automate Acrobat using IAC (InterApplication Communications), as documented in the Acrobat SDK. Your program could loop through a collection of PDFs, load them in Acrobat, extract the form data from each, and generate a CSV file that contains the data.
    Acrobat can also do this with its "Merge Data Files into Spreadsheet" function, but this is a manual process.

  • Read and write a .CSV file contains cirillic characters issue

    Hi guys,
    I am a developer of a web application project which uses Oracle Fusion Middleware technologies. We use JDeveloper 11.1.1.4.0 as development IDE.
    I have a requirement to get a .csv file from WLS to application running machine. I used a downloadActinLinsener in front end .jspx in order to do that.
    I use OpenCSV library to read and write .csv files.
    Here is my code for read and write the .csv file,
    public void dwdFile(FacesContext facesContext, OutputStream out) {
    System.out.println("started");
    String [] nextLine;
    try {
    FileInputStream fstream1 = new FileInputStream("Downloads/filetoberead.CSV");
    DataInputStream in = new DataInputStream(fstream1);
    BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8"));
    CSVReader reader = new CSVReader(br,'\n');
    //CSVReader reader = new CSVReader(new FileReader("Downloads/ACTIVITY_LOG_22-JAN-13.csv"),'\n');
    List<String> list=new ArrayList();
    while ((nextLine = reader.readNext()) != null) {
    if(nextLine !=null){
    for(String s:nextLine){
    list.add(s);
    System.out.println("list size ; "+list.size());
    OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8");
    CSVWriter writer = new CSVWriter(w, ',','\u0000');
    for(int i=0;i<list.size();i++){
    System.out.println("list items"+list.get(i));
    String[] entries = list.get(i).split(",");
    writer.writeNext(entries);
    //System.out.println("list items : "+list.get(i));
    writer.close();
    } catch (IOException e) {
    e.printStackTrace();
    say the filetoberead.CSV contains following data,
    0,22012013,E,E,ASG,,O-0000,O,0000,100
    1,111211,LI,0,TABO,B,M002500003593,,,К /БЭ60072715/,КАРТЕНБАЙ
    2,07,Balance Free,3
    1,383708,LI,0,BDSC,B,НЭ63041374,,,Т /НЭ63041374/,ОТГОНБААТАР
    2,07,Balance Free,161
    It reads and writes the numbers and english characters correct. All cirillic characters it prints "?" as follows,
    0,22012013,E,E,ASG,,O-0000,O,0000,100
    1,111211,LI,0,TABO,B,M002500003593,,,? /??60072715/,?????????
    2,07,Balance Free,3
    1,383708,LI,0,BDSC,B,??63041374,,,? /??63041374/,???????????
    2,07,Balance Free,161
    can somone please help me to resolve this problem?
    Regards !
    Sameera

    Are you sure that the input file (e.g. "Downloads/filetoberead.CSV") is in UTF-8 character set? You can also check it using some text editor having a view in hex mode. If each Cyrillic character in your input file occupies a single byte (instead of two), then the file is not in UTF-8. Most probably it is in Cyrillic for Windows (CP1251).
    If this is the case, you should modify the line
    BufferedReader br = new BufferedReader(new InputStreamReader(in,"UTF-8"));toBufferedReader br = new BufferedReader(new InputStreamReader(in,"windows-1251"));Dimitar

  • Data modeler, error when exporting to csv files

    hi, i have a relational model and i need to export this model to csv files, when exporting the model it errors,
    displaying the following error nmessage:
    Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 584
    Oracle SQL Developer Data Modeler Export Log
    Date and Time: 2010-09-21 15:17:17
    Design Name: Diagram
    Model Name: CSV
    Export Finished
    Errors: 1
    Warnings:0
    <<<<< ERRORS >>>>>
    java.lang.NullPointerException
    the issue is a file is missing when exporting proccess is done, the file is DM_CommentsRDBMS.csv, this file contains the commens of columns.
    Thanks.

    Hi,
    I logged bug however information is not enough to locate the problem.
    You can use export to reporting schema in order to get your model exported - in database in that case.
    We are not going to extend "export to CSV file" functionality any further - it'll be as it is now.
    Philip

  • Read and write into csv file using procedure

    I would like to read a particular column value from csv file(which will have many columns) using procedure and for that value I have to retrieve some more values from database table and have to append into same csv file.
    can someone help me?
    Thanks
    Edited by: 1002478 on Apr 25, 2013 5:52 AM
    Edited by: 1002478 on Apr 25, 2013 5:55 AM

    1002478 wrote:
    thanks for your reply.
    Using UTL_FILE i'm able to read csv file. I'm stuck up in appending some more columns to same csvYou'll struggle to append data to an existing CSV.
    You'd be better to read the data from one CSV, and create another CSV using that data, and the extra data you want, and then when finished, delete the original file and rename the new file to the old filename.
    You should be able to do that using External Tables to read the source file (easier than using UTL_FILE) and UTL_FILE to write the new file.

  • Is it possible to export a CSV file in stead of a XLS file in WDA ALV?

    I know the user can change the file type themselves. But it would be better to export a CSV file directly. Do you have any suggestion?
    Many thanks!

    Refer this thread : Re: How Export to CSV format from WDA
    May be it helps you.

Maybe you are looking for

  • Apple Remote Desktop and Itunes

    I am using Apple remote desktop to connect to several servers with several users on each server. When Itunes is playing and I try to fast user switch, it will stop playing itunes on the user I am switching from. Is anyone familiar with any problems l

  • How to create an lov with command link

    hi all i want to create an lov such that each of the values in the list have a command link. when i click on a particular value, that value should be removed from the lov list and displayed on my page. like for example, i want to send a mail to many

  • Dump in VF02

    Hello, I have activated COPA and it works correctly but I appears a dump when I try to create a billing document with a reference document that has been created before activating COPA. The dump says: Anál.errores                                      

  • OC4JStartup class implementation

    When I wanna use Context as following, I gets complains "javax.naming.NamingException: Not in an application scope - start OC4J with the -userThreads switch if using user-created threads" (I have tried to use -userThreads and enable global jndi looku

  • Documentation for Report Designer

    Does anyone have any good links to any documentation on Report Designer?  I am looking for something more than what can be found at: http://help.sap.com/saphelp_nw2004s/helpdata/en/43/8af9fecf797107e10000000a1553f7/frameset.htm Any help would be grea