Csv display

I have a corporate reports web site that includes links to CSV files.   Using Snow Leopard and Safari 5.1.1 (all software up to date) the file would display in the browser, the same as PDF files on the same reports web site.    However under Lion 10.7.2 and Safari 5.1.1 (again all software up to date) now the CSV files are downloaded and then I have to click on the downloads, navigate to the downloads directory, and then Excel has to open the CSV file.      The versions of Safari are exactly matching but the behavior is different.   Is there a CSV document plug-in or similar that got deleted when I upgraded to Lion?    Thanks

Thanks for the replies.
I haven't decided on which or how the technology side I will use.
I've been googling with no luck (probably lack of googling skill) :(
I was thinking to create a web application using Spring and JSP, but I don't even know if it's possible.
Which way will be simpler? JSP or servlet?
Sorry, I don't know which forum I should use, since I don't know which technology to use for my solution.
All I know that I need to create an html table to display my csv file and running Web server application such as JBoss.
Thanks,

Similar Messages

  • Exporting to CSV Displays Different Information

    I am working on a script to show me the size of every mailbox in the company. I want to export this information to a CSV so I can sort and keep it offline. Below are my various scripts that I have tried with an explanation of what happens when I use it.
    1. Get-Mailbox | Get-MailboxStatistics | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (GB)”;expression={$_.TotalItemSize.Value.ToGB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage
    Limit”;expression={$_.StorageLimitStatus}} > e:\tmp.csv
    With this script I get the correct info in the format I want, but it ignore the commas and everything ends up in column A. Making it to where I cannot sort it.
    2. Get-Mailbox | Get-MailboxStatistics | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (GB)”;expression={$_.TotalItemSize.Value.ToGB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage
    Limit”;expression={$_.StorageLimitStatus}} | Export-csv -Path e:\mailboxsize.csv -NoTypeInformation -Delimiter ","
    With this script I get "ClassID" information and nothing that I need. However, when I remove everything after the last pipe (the Export-csv section) then all the information displays correctly in powershell.
    3. Get-Mailbox | Get-MailboxStatistics | ft DisplayName,TotalItemSize,ItemCount | export-csv e:\test.csv -notypeinformation -delimiter ","
    With this script I tried to go basic, since I read that you cannot pre-format a CSV export. I also tried it without the -Delimiter switch. Both give me the same results as script #2
    4. Get-Mailbox | Get-MailboxStatistics | ft DisplayName,TotalItemSize,ItemCount > e:\tmp.csv
    Tried the basic approach with the > instead of export-csv and I get the same results as script 1, just not sorted.
    Can someone tell me what I am missing to make Powershell see my commas and give me the correct data when using Export-CSV?
    Thanks!

    Hi,
    Don't use the Format-* cmdlets if you want to do anything else with the data. In your case, try replacing ft with Select-Object.
    EDIT: As an example, here's your #4:
    Get-Mailbox |
    Get-MailboxStatistics |
    Select DisplayName,TotalItemSize,ItemCount |
    Sort DisplayName |
    Export-Csv .\mbxStats.csv -NoTypeInformation
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Create local user via dropdown from .csv

    Hello
    i try to create a powershell script to create local users on Win7.
    All the user informations are stored in a .csv file.
    Now I'd like to have a dropdown-menu to choose which user should be created.
    So i want the first column of the csv displayed in the Dropdown.
    When a option gets choosen the script should read the rest of the information out of the .csv-file and create the user with it.
    i got some parts to create a dropdown and to create local users via .csv, but my limited powershell knowledge keeps me from putting it to one piece.

    Hi Yannick Hassler,
    To create local users with properties listed in a csv file, and also add the users to a local group, please refer to the script below:
    import-csv d:\3.csv | foreach{
    $server=[adsi]"WinNT://$env:computername"
    $user=$server.Create("User",$_.name)
    $user.SetPassword($_.password)
    $user.SetInfo()
    # add extra info
    $user.Put('Description',$_.description)
    $user.SetInfo()
    # add user to mandatory local group
    $group = $_.group
    $group=[adsi]"WinNT://$env:computername/$group"
    $group.Add($user.path)
    # add users to other groups
    Please also save your .csv file d:\3.csv like this :
    Name
    password
    group
    description
    TUTTLSX
    Password
    Users
    Test user
    annaretu
    Password
    Users
    Test user11
    I hope this helps.

  • PS Script To Rename File Using CSV - Filename Is Containing IP Address And Needs To Be Host Name

    Hello All,
    I am currently working with PDF reports which are named "TEMXX.XX.XXX.XX_141215.pdf", XX.XX.XXX.XX is an IP address. I have created a CSV which contains two columns, ColumnA = IPAddress ColumnB = HostName. I would like to remove the existing title
    of the file, and rename it as "ColumnB.pdf".
    The only two commands which come to mind are:
    get-childitem *.pdf | foreach { rename-item $_ $_.Name.Replace("TEM", "") }
    get-childitem *.pdf | foreach { rename-item $_ $_.Name.Replace("_141215", "") }
    The above commands are of course to remove the unwanted "TEM" and "_141215" but I cannot seem to figure out how to just rename files as ColumnB.pdf.
    Any help would be greatly appreciated :).

    Hello All,
    I performed the following but it did not execute, just returned the prompt. The final ps1 file was saved and ran as follows:
    $lines = Import-Csvservers.csv
    ForEach($line in $lines){
    get-childitem *.pdf |where {$_.name -eq $line.ColumnA}|Rename-Item -NewName $line.ColumnB
    CSV file named servers.csv displayed as follows:
    ColumnA,ColumnB
    192.168.1.2,SERVER1
    192.168.1.3,SERVER2
    Files in Explorer displayed as follows:
    ray192.168.1.2_2015.pdf
    ray192.168.1.3_2015.pdf
    As indicated above the filename should be finalized as:
    SERVER1.pdf
    SERVER2.pdf
    Any help in figuring this out would be greatly appreciated.

  • ORA-29284: File read error

    Good morning,
    Need to do two flat file on a 2000 lien.
    1 - Read a file. csv
    2 - Keep it plain, unformatted information from a table
    These are the steps I performed to achieve the first goal ...
    1 - READING TEST FILE
    CREATE OR REPLACE DIRECTORY PUBLIC_ACCESS AS 'C:\REPORTES_REY';
    GRANT READ, WRITE ON DIRECTORY PUBLIC_ACCESS TO PUBLIC;
    -- THIS PL / SQL works ok..
    DECLARE
    v1 utl_file.file_type;
    v2 varchar2(600);
    begin
    v1:= utl_file.fopen('PUBLIC_ACCESS','prueba20110218.csv','R'); -- WORKS WELL ...
    --v1:= utl_file.fopen('PUBLIC_ACCESS','sui_facturacion_alcantarillado_15085_2011_01_76845_001.csv','R');
    loop
         begin
              utl_file.get_line(v1,v2);
              dbms_output.put_line('el contenido del archivo es: '||v2);
              exception
              when no_data_found then
              exit;
         end;
              dbms_output.put_line(' - ');  JUMP LINE
    end loop;
         utl_file.fclose(v1);
    exception
         when others then
         dbms_output.put_line(sqlerrm);
    end;
    but when you change the file name by map prueba20110218.csv de-> sui_facturacion_alcantarillado_15085_2011_01_76845_001.csv displays the following error
    ORA-29284: File read error+
    - this error to be?
    I am grateful for the attention and cooperation extended ...
    good day ...
    REYNEL SALAZAR MARTÍNEZ
    Cali-Colombia

    Thank you very much for your cooperation extended
    The file if it exists, the operating system is Windows, I'm running for the line of command and the file is in the same direction as the file prueba20110218.csv
    Segi therefore his advice and remove:
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    then run the following code:
    DECLARE
    v1 utl_file.file_type;
    v2 varchar2(800);
    begin
    v1:= utl_file.fopen('PUBLIC_ACCESS','prueba20110218.csv','R'); FUNCIONA BIEN...+
    v1:= utl_file.fopen('PUBLIC_ACCESS','sui_facturacion_alcantarillado_15085_2011_01_76845_001.csv','R',32767);
    loop
    begin
    utl_file.get_line(v1,v2);
    dbms_output.put_line('el contenido del archivo es: '||v2);
    exception
    when no_data_found then
    exit;
    end;
    dbms_output.put_line(' - ');  SALTO DE LINEA+
    end loop;
    utl_file.fclose(v1);
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    +/+
    ORA-06502: PL / SQL: error: character string buffer too small numeric or value
    I do not understand the error -> ORA-06502
    thanks...
    good day
    Reynel Salazar Martínez
    Cali-Colombia

  • Implementing archive functionality

    Hi all ,
    I want to implement archive functionality.
    I am using appfuse and maven.(spring framework)
    In my aplication when user logs in he is provided with list of records from one table.
    He should be able to archive as many recrds as he want.
    I am not getting how to implement this functionality.
    Code of jsp which shows al records is
    <head>
    <title><fmt:message key="engagementformList.title"/></title>
    <meta name="heading" content="<fmt:message key='engagementformList.heading'/>"/>
    <meta name="menu" content="EngagementformMenu"/>
    </head>
    <c:set var="buttons">
    <input type="button" style="margin-right: 5px"
    onclick="location.href='<c:url value="/engagementformform.html"/>'"
    value="<fmt:message key="button.add"/>"/>
    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
    value="<fmt:message key="button.exit"/>"/>
    </c:set>
    <c:out value="${buttons}" escapeXml="false"/>
    <form>
    <display:table name="engagementformList" class="table" requestURI="" id="engagementformList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="engagementformform.html" media="html"
    paramId="id" paramProperty="id" titleKey="engagementform.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="engagementform.id"/>
    <display:column sortProperty="dateLastMod" sortable="true" titleKey="engagementform.dateLastMod">
    <fmt:formatDate value="${engagementformList.dateLastMod}" pattern="dd/MM/yyyy"/>
    </display:column>
    <display:column sortProperty="dateRcvd" sortable="true" titleKey="engagementform.dateRcvd">
    <fmt:formatDate value="${engagementformList.dateRcvd}" pattern="dd/MM/yyyy"/>
    </display:column>
    <display:column property="title" sortable="true" titleKey="engagementform.title"/>
    <display:column property="requestorsName" sortable="true" titleKey="engagementform.requestorsName"/>
    <display:column property="requestorsExtensionNo" sortable="true" titleKey="engagementform.requestorsExtensionNo"/>
         <display:column property="requestorsEmailId" sortable="true" titleKey="engagementform.requestorsEmailId"/>
    <display:column property="LOB" sortable="true" titleKey="engagementform.LOB"/>
    <display:column property="ITSolutionLeadsName" sortable="true" titleKey="engagementform.ITSolutionLeadsName"/>
    <display:column property="ITSolutionLeadsExtensionNo" sortable="true" titleKey="engagementform.ITSolutionLeadsExtensionNo"/>
    <display:column property="ITSolutionLeadsEmailId" sortable="true" titleKey="engagementform.ITSolutionLeadsEmailId"/>
    <display:column property="solve" sortable="true" titleKey="engagementform.solve"/>
    <display:column property="solveNumber" sortable="true" titleKey="engagementform.solveNumber"/>
    <display:column property="typeofRequest" sortable="true" titleKey="engagementform.typeofRequest"/>
    <display:column property="partOfProgram" sortable="true" titleKey="engagementform.partOfProgram"/>
    <display:column property="reasonWorkRequired" sortable="true" titleKey="engagementform.reasonWorkRequired"/>
    <display:column property="descriptionOfWorkRequired" sortable="true" titleKey="engagementform.descriptionOfWorkRequired"/>
    <display:column property="impactIfChangeIsNotMade" sortable="true" titleKey="engagementform.impactIfChangeIsNotMade"/>
    <display:column property="relatedProjectProgramActivity" sortable="true" titleKey="engagementform.relatedProjectProgramActivity"/>
    <display:column property="quantifiedFinancialBenefits" sortable="true" titleKey="engagementform.quantifiedFinancialBenefits"/>
    <display:column property="otherBenefits" sortable="true" titleKey="engagementform.otherBenefits"/>
    <display:column property="funding" sortable="true" titleKey="engagementform.funding"/>
    <display:column property="priority" sortable="true" titleKey="engagementform.priority"/>
    <display:column property="priorityDate" sortable="true" titleKey="engagementform.priorityDate"/>
    <display:column property="timingIssues" sortable="true" titleKey="engagementform.timingIssues"/>
    <display:column property="alternativeSolutions" sortable="true" titleKey="engagementform.alternativeSolutions"/>
    <display:column property="status" sortable="true" titleKey="engagementform.status"/>
    <display:column property="username" sortable="true" titleKey="engagementform.username"/>
    <%-- <display:column property="archived" sortable="true" titleKey="engagementform.archived"/> --%>
    <display:column sortable="true" titleKey="engagementform.archived">
    <input type="checkbox" name="archived" value="${engagementformList.id}" >
    <c:out value="${engagementformList.id}" />
         </display:column>
    <display:setProperty name="paging.banner.item_name" value="engagementform"/>
    <display:setProperty name="paging.banner.items_name" value="engagementforms"/>
    <display:setProperty name="export.excel.filename" value="Engagementform List.xls"/>
    <display:setProperty name="export.csv.filename" value="Engagementform List.csv"/>
    <display:setProperty name="export.pdf.filename" value="Engagementform List.pdf"/>
    </display:table>
    </form>
    <c:out value="${buttons}" escapeXml="false"/>
    I ma not getting how will i collect all the reocrds that are marked for archiving in from this jsp and pass it to controller for archiving.
    Can anybody have an idea about this or implemented this before.
    Thanks in advance.

    yes,but i am notegetting how will i collect all the records for which checkbox has checked im this jsp and how to pass that list of records from jsp to controller. :(

  • A small Java Problem for java Experts

    Hi Guys...
    I have a small problem with my program...
    Tha program I am using consist of several frames where one invokes the other in row.
    These are the classes I am using:
    the FIRST class://THIS CLASS IS NOT COMPLETE
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * LabelDemo.java is a 1.4 application that needs one other file:
    * images/middle.gif
    public class CSVloader extends JPanel implements ActionListener {
         ImageIcon icon ;
         JLabel label;
    JButton theButton1;
    JButton saveButton;
    JButton displayButton;
    JButton displayStyleButton;
    JFileChooser fc;
    final boolean shouldFill = true;
    final boolean shouldWeightX = true;
    public CSVloader() {
    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    setLayout(gridbag);
    if (shouldFill) {
    //natural height, maximum width
    c.fill = GridBagConstraints.HORIZONTAL;
    theButton1 = new JButton("Choose source File");
    theButton1.addActionListener(this);
    if (shouldWeightX) {
    c.weightx = 0.5;
    c.gridx = 0;
    c.gridy = 0;
    gridbag.setConstraints(theButton1, c);
    add(theButton1);
    displayStyleButton = new JButton("CSV Display style");
    displayStyleButton.addActionListener(this);
    c.gridx = 0;
    c.gridy = 2;
    gridbag.setConstraints(displayStyleButton, c);
    add(displayStyleButton);
    displayButton = new JButton("Display");
    displayButton.addActionListener(this);
    c.gridx = 1;
    c.gridy = 0;
    gridbag.setConstraints(displayButton, c);
    add(displayButton);
    saveButton = new JButton("Save");
    saveButton.addActionListener(this);
    c.gridx = 0;
    c.gridy = 1;
    gridbag.setConstraints(saveButton, c);
    add(saveButton);
    icon = new ImageIcon("c:/applets/CSVlogo.gif");
    //Create the first label.
    label = new JLabel(icon);
    c.ipady = 45; //make this component tall
    c.weightx = 0.0;
    c.gridwidth = 1;
    c.gridx = 1;
    c.gridy = 1;
    gridbag.setConstraints(label, c);
    add(label);
    fc = new JFileChooser();
    public Dimension getDimension(int hight, int width) {
    Dimension theDimension = new Dimension(hight,width);
    return theDimension;
    public void actionPerformed(ActionEvent e) {
    //Handle open button action.
    if (e.getSource() == theButton1) {
    int returnVal = fc.showOpenDialog(CSVloader.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    //This is where a real application would open the file.
    //Handle save button action.
    } else
    if (e.getSource() == displayButton) {
         try {
    Runtime.getRuntime().exec("cmd /c start " + "c:\\applets\\displayData.html");
    catch(IOException io)
    System.err.println("Caught IOException: " +
         io.getMessage());
    }else
    if (e.getSource() == displayStyleButton)
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("Display Style");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    DisplayStyle newContentPane = new DisplayStyle();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    else
    if (e.getSource() == saveButton) {
         int returnVal = fc.showOpenDialog(CSVloader.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File saveFile = fc.getSelectedFile();
    //This is where a real application would open the file.
    public static void main(String[] args) {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("LabelDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    CSVloader newContentPane = new CSVloader();
    newContentPane.setBackground(Color.WHITE);
    newContentPane.setOpaque(true);
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    // Runtime.getRuntime().exec("cmd /c start " + "....\\docs\\index.html");
    this is the SECOND class:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DisplayStyle extends JPanel implements ActionListener{
         public static final int FIRST_OPTION = 0;
         public static final int SECOND_OPTION = 1;
         public static final int THIRD_OPTION = 2;
         public static final int THE_BUTTON_OPTION =3;
    public static final int ERROR = -1;
         public int selectedOption = ERROR;
         static String table = "Table";
         static String tableNoBorders = "Table without Borders";
         static String highlightedTable = "Highlighted Table without Borders";
         public JRadioButton theTable;
         public JRadioButton theTable2;
         public JRadioButton theTable3;
         public JButton theButton;
         public String theName;
         public DisplayStyle ()
         theTable = new JRadioButton(table);
         theTable.setActionCommand(""+ FIRST_OPTION);
         theTable.addActionListener(this);
         theTable.setMnemonic(KeyEvent.VK_B);     
    theTable.setSelected(true);
    theTable2 = new JRadioButton(tableNoBorders);
    theTable2.setActionCommand(""+ SECOND_OPTION);
         theTable2.addActionListener(this);
         theTable2.setMnemonic(KeyEvent.VK_B);     
    theTable3 = new JRadioButton(highlightedTable);
    theTable3.setActionCommand(""+ THIRD_OPTION);
         theTable3.addActionListener(this);
         theTable3.setMnemonic(KeyEvent.VK_B);     
    theButton = new JButton("OK");
    theButton.setActionCommand(""+ THE_BUTTON_OPTION);
    theButton.addActionListener(this);
         ButtonGroup group = new ButtonGroup();
    group.add(theTable);
    group.add(theTable2);
    group.add(theTable3);
    JLabel theLabel = new JLabel("Choose the style of Display");
    JPanel radioPanel = new JPanel(new GridLayout(0, 1));
    radioPanel.add(theLabel);
    radioPanel.add(theTable);
    radioPanel.add(theTable2);
    radioPanel.add(theTable3);
    radioPanel.add(theButton);
    add(radioPanel, BorderLayout.LINE_START);
         public void actionPerformed (ActionEvent e) {
         if(e.getSource() == theButton)
         JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame1 = new JFrame("The Format");
    frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Formats newFormat = new Formats();
    newFormat.setOpaque(true); //content panes must be opaque
    frame1.setContentPane(newFormat);
    //Display the window.
    frame1.pack();
    frame1.setVisible(true);
         selectedOption = Integer.parseInt(e.getActionCommand().trim());
         public DisplayStyle getInstance(){
              return this;      
    this is the THIRD class:
    mport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Formats extends JPanel implements ActionListener{
         public static final int FIRST_OPTION = 0;
         public static final int SECOND_OPTION = 1;
         public static final int THIRD_OPTION = 2;
         public static final int FOURTH_OPTION = 4;
         public static final int THE_BUTTON_OPTION =3;
    public static final int ERROR = -1;
         public int selectedOption = ERROR;
         static String standardFormat = "Date first";
         static String timeFirstFormat = "Time First";
         static String typeFirstFormat = "Type of call first";
         static String extFirstFormat = "Extension first";
         public JButton theButton;
         public JRadioButton theStandardButton1 ;
         public JRadioButton theTimeButton;
         public JRadioButton theTypeButton;
         public JRadioButton theExtButton ;
         public Formats()
    theStandardButton1 = new JRadioButton(standardFormat);
         theStandardButton1.setMnemonic(KeyEvent.VK_B);     
    theStandardButton1.setSelected(true);
         theTimeButton = new JRadioButton(timeFirstFormat);
         theTimeButton.setMnemonic(KeyEvent.VK_B);     
    theTypeButton = new JRadioButton(typeFirstFormat);
         theTypeButton .setMnemonic(KeyEvent.VK_B);     
    theExtButton = new JRadioButton(extFirstFormat);
         theExtButton.setMnemonic(KeyEvent.VK_B);     
         ButtonGroup group = new ButtonGroup();
    group.add(theStandardButton1);
    group.add(theTimeButton);
    group.add(theTypeButton);
    group.add(theExtButton);
    JLabel newLabel = new JLabel("Choose the Format type for the data to be displayed");
    theButton = new JButton("OK");
    theButton.addActionListener(this);
    theButton.setActionCommand("" + THE_BUTTON_OPTION);
    JPanel radioPanel = new JPanel(new GridLayout(0, 1));
    radioPanel.add(newLabel);
    radioPanel.add(theStandardButton1);
    radioPanel.add(theTimeButton);
    radioPanel.add(theTypeButton);
    radioPanel.add(theExtButton);
    radioPanel.add(theButton);
    add(radioPanel, BorderLayout.LINE_START);      
         public void actionPerformed (ActionEvent e) {
         if(e.getSource() == theButton)
         JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("The Font");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    TableFonts newFont = new TableFonts();
    newFont.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newFont);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
         selectedOption = Integer.parseInt(e.getActionCommand().trim());
         public Formats getInstance(){
              return this;      
    and the last class:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TableFonts extends JPanel implements ActionListener{
         static String standardFont = "Standard Font";
         static String boldFont = "Bold Font";
         static String italicFont = "Italic Font";
         static String monospaceFont = "Monospace Font";
         public      JRadioButton theStandardButton ;
         public JRadioButton theBoldButton;
         public JRadioButton theItalicButton;
         public JRadioButton theMonospaceButton ;
         public TableFonts()
    theStandardButton = new JRadioButton(standardFont);
         theStandardButton.setMnemonic(KeyEvent.VK_B);     
    theStandardButton.setSelected(true);
         theBoldButton = new JRadioButton(boldFont);
         theBoldButton.setMnemonic(KeyEvent.VK_B);     
    theItalicButton = new JRadioButton(italicFont);
         theItalicButton .setMnemonic(KeyEvent.VK_B);     
    theMonospaceButton = new JRadioButton(monospaceFont);
         theMonospaceButton.setMnemonic(KeyEvent.VK_B);     
         ButtonGroup group = new ButtonGroup();
    group.add(theStandardButton);
    group.add(theBoldButton);
    group.add(theItalicButton);
    group.add(theMonospaceButton);
    theStandardButton.addActionListener(this);
    theBoldButton.addActionListener(this);
    theItalicButton.addActionListener(this);
    theMonospaceButton.addActionListener(this);
    JLabel newLabel = new JLabel("Choose the correct font for the data to be displayed");
    JPanel radioPanel = new JPanel(new GridLayout(0, 1));
    radioPanel.add(newLabel);
    radioPanel.add(theStandardButton);
    radioPanel.add(theBoldButton);
    radioPanel.add(theItalicButton);
    radioPanel.add(theMonospaceButton);
    add(radioPanel, BorderLayout.LINE_START);
         public void actionPerformed(ActionEvent e) {
    The problem I am getting is the Number format exception when the OK button of the class Formats is clicked...
    here is the error I am getting:
    java.lang.NumberFormatException: For input string: "OK"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:48)
    at java.lang.Integer.parseInt(Integer.java:426)
    at java.lang.Integer.parseInt(Integer.java:476)
    at Formats.actionPerformed(Formats.java:80)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    64)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1817)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:419)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5134)
    at java.awt.Component.processEvent(Component.java:4931)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java:1590)
    at java.awt.Component.dispatchEvent(Component.java:3480)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    COULD YOU GUYS PLEASE TELL ME HOW TO GET AROUND THIS PROBLEM:
    THANKS...

    It's in this line:
    selectedOption = Integer.parseInt(e.getActionCommand().trim());
    Kind regards,
      Levi
    PS. have you noticed the [code][code[i]] tags?

  • Export file from MaxL security commands

    Hi all,
    I've simple maxl statements as,
    spool on to C:\samplefile.csv;
    display group all ;
    I get a file generated after running these commands in EAS MaxL editor. But the format of file is very tough to split into columns.
    What is the format of file for such kind of outputs? Is there any utility which can split the output into regular columns ?

    The problem with the output is that the columns are too narrow and a lot of stuff (usually) gets cut off.
    Try this command to set the column width a bit wider and then look at it in a real editor, e.g, Textpad, Ultraedit, Notepad++, whatever:
    set column_width 100 ;
    FWIW, I never use the EAS MaxL editor (mostly it just gives me a pain) and always use double backslashes and double quotes:
    spool on to "C:\\samplefile.csv" ;Regards,
    Cameron Lackpour
    Edited by: CL on May 21, 2012 10:53 AM

  • Adressbook

    Dear reader,
    As ik want to import adress data from my old microsoft acess database I am looking for a way to sync my adressbook fast with a spreadsheet in numbers. At the moment I have a problem with importing Birhtday data. Number spreadsheet displays them correct as dd mmm yyyy. CSV displays them correct. But Adress book messes them up  into mm dd yyyy. How do I solve this problem?

    Your problem is linked to an AddressBook feature.
    As far as I remember, it doesn't take care of region's settings to determine the way it must treat date_time values.
    On your machine, the first language is English so Numbers and AddressBook run in English.
    Numbers take care of your Region's settings so it work with dd/mm/yyyy dates
    AddressBook doesn't take care of the Region's settings so it work with mm/dd/yyyy dates.
    More, AddressBook is unable to import CSV created by Numbers using the decimal comma which means that it separater values by semi-colons.
    To achieve your goal, change temporarily your settings to English with the date format mm/dd/yyyy.
    Numbers will convert the dates already imported from Access in the mm/dd/yyyy format so you will be able to export the dates stored in Numbers to AddressBook and to import records from AddressBook.
    When it will be done, reset your system to your preferred settings. One more time, Numbers will take care of the format change.
    Explanation:
    Happily, Numbers '09 dropped the date storage used in Numbers '08.
    It store the count of seconds between 2001/01/01 00:00:00 and the date inserted in the cell.
    This way, the wished format create absolutely no problem.
    Yvan KOENIG (VALLAURIS, France) vendredi 21 octobre 2011 16:02:49
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Display data from CSV file in iWeb page

    Hi,
    I like to display data from a CSV file in iWeb page if a date value from CSV file matches todays value from the system. Here is an example.
    CSV data values
    01/20/2011,Sunny,87
    01/21/2011,Cloudy,100
    01/22/2011,Rainy,60
    If today's date value is 01/21/2011 the page should display 01/21/2011 Cloudy 100 in a tabular format.
    Appreciate your help in providing HTML code for this issue.
    Thanks

    I suspect there is a soft return in the excel database somewhere that can't be seen. Take the csv/txt file into notepad and look for a line that starts oddly compared to the others.
    I haven't had luck removing soft returns from excel files so I do this a rather odd way. I take the excel file into InDesign as a table, and then use find/change to replace any soft returns with nothing, then convert the text to table and then export the text out again by going export, and selecting text from the dropdown menu.
    For my money, I always save tab delimited text files from excel so that if a field does contain commas, it doesn't "trick" indesign into thinking a new field is beginning or not... instead the field delimiters are tabs and they are unlikely to have been used in the excel database.
    If you do choose to use this indesign import method of mine to clean up the database, i also noticed two things in your screengrab: first was that some fields have spaces at the start of the text... easy enough to fix with a GREP that looks for ^\s (start of a sentence followed by a space) and replace with nothing. The second thing is the T&C field that all entries (at least in the screengrab) all start the same – if all entries in the database start the same, couldn't that line be in the indesign file? Its only a small detail I know.

  • Memory problem with loading a csv file and displaying 2 xy graphs

    Hi there, i'm having some memory issues with this little program.
    What i'm trying to do is reading a .csv file of 215 mb (6 million lines more or less), extracting the x-y values as 1d array and displaying them in 2 xy graphs (vi attacked).
    I've noticed that this process eats from 1.6 to 2 gb of ram and the 2 x-y graphs, as soon as they are loaded (2 minutes more or less) are really realy slow to move with the scrollbar.
    My question is: Is there a way for use less memory resources and make the graphs move smoother ?
    Thanks in advance,
    Ierman Gert
    Attachments:
    read from file test.vi ‏106 KB

    Hi lerman,
    how many datapoints do you need to handle? How many do you display on the graphs?
    Some notes:
    - Each graph has its own data buffer. So all data wired to the graph will be buffered again in memory. When wiring a (big) 1d array to the graph a copy will be made in memory. And you mentioned 2 graphs...
    - load the array in parts: read a number of lines, parse them to arrays as before (maybe using "spreadsheet string to array"?), finally append the parts to build the big array (may lead to memory problems too).
    - avoid datacopies when handling big arrays. You can show buffer creation using menu->tools->advanced->show buffer allocation
    - use SGL instead of DBL when possible...
    Message Edited by GerdW on 05-12-2009 10:02 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I display a .csv file as a real time waveform using labview

    Hi folks.
    As stated, Im looking to display a .CSV file (obtained via RS-232, example; 100,101,102,102,102,103...) as a waveform in real-time. What is the best way to approach this? Im thinking LabVIEW. I have version 7.1 but am not really experienced in using it. I'll give anything a go though. Also, I have Visual Studio 2005, so I was thinking VB???
    Thanks in advance!
    Simon.
    Message Edited by simonious on 10-26-2007 04:13 AM

    Have a look at this VI.
    Add a convert string to number function behind it.
    André
    Message Edited by andre.buurman@carya on 10-26-2007 01:08 PM
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
    Attachments:
    convert csvars 2 array of vars.vi ‏16 KB

  • Hi, I want to display a Linechart  from Excel file(i.e CSV data),I read the csv data using FileReference ,But how to display data in linechart?

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"   >
    <mx:Script>
          <![CDATA[
                import mx.controls.*;
                import mx.collections.*;
                import flash.events.*;
                import mx.collections.ArrayCollection
                [Bindable]
                private var records:Array=new Array();
                [Bindable]
                private var datarecords:ArrayCollection=new ArrayCollection();
                private var xmldata:String="<?xml version=\"1.0\"?>\r\n<dataset>\r\n";
                private var fileref:FileReference=new FileReference();;
                private function readExcel():void
                      var request:URLRequest=new URLRequest();
                      request.url="data/chart.csv";
                      var loader:URLLoader=new URLLoader();
                      loader.dataFormat=URLLoaderDataFormat.TEXT;
                      loader.addEventListener(Event.COMPLETE,eventComplete);
                      loader.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
                      loader.load(request);
                private function eventComplete(event:Event):void
                      var loader:URLLoader=URLLoader(event.target);
                      var record:Array=new Array();
                      var fields:Array=new Array();
                      var obj:Object;
                      var str:String=new String();
                      loader.dataFormat=URLLoaderDataFormat.TEXT;
                      var result:String=new String(loader.data);
                      record=result.split("\r\n");
                      for(var i:int=1;i<record.length;i++)
                            obj=new Object();
                            fields=record[i].split(",");
                            /* obj.col1="Timestamp: "+fields[0];
                            obj.col2="EndDevice-PaLnaMode: "+fields[1];
                            obj.col3="Wap-PaLnaMode: "+fields[2];
                            obj.col4="DownstreamLqi: "+fields[3];
                            obj.col5="UpstreamLqi: "+fields[4]; */
                            obj.col1="<Timestamp>"+fields[0]+"</Timestamp>";
                            xmldata+=obj.col1+"\r\n";
                            obj.col2="<EndDevice-PaLnaMode>"+fields[1]+"</EndDevice-PaLnaMode>";
                            xmldata+=obj.col2+"\r\n";;
                            obj.col3="<Wap-PaLnaMode>"+fields[2]+"</Wap-PaLnaMode>";
                            xmldata+=obj.col3+"\r\n";
                            obj.col4="<DownstreamLqi>"+fields[3]+"</DownstreamLqi>";
                            xmldata+=obj.col4+"\r\n";;
                            obj.col5="<UpstreamLqi>"+fields[4]+"</UpstreamLqi>";
                            records.push(obj);
                            datarecords.addItem(obj);
                      xmldata+="</dataset>";
                      datagrid.dataProvider=records;
                      linechart1.dataProvider=records;
                      private  function onIOError(event:Event):void
                            Alert.show("I/O error"+event.type);
                      private function saveXML():void
                            fileref.save(xmldata,"xmldata.xml");
                      //fileref.save(xmldata,"NewFileName.txt");
                      private function dispData():void
                            fileContents_txt.text=xmldata;
          ]]>
    </mx:Script>     
          <mx:DataGrid id="datagrid" x="19" y="76" width="528" height="242">
                <mx:columns>
                      <mx:DataGridColumn headerText="Timestamp" dataField="col1"/>
                      <mx:DataGridColumn headerText="DevicePaLnaMode" dataField="col2"/>
                      <mx:DataGridColumn headerText="Wap-PaLnaMode" dataField="col3"/>
                      <mx:DataGridColumn headerText="DownstreamLqi" dataField="col4"/>
                      <mx:DataGridColumn headerText="UpstreamLqi" dataField="col5"/>
                </mx:columns>
          </mx:DataGrid>
          <mx:Button x="126" y="32" label="read" click="readExcel()"/>
          <mx:Button x="240" y="32" label="display data" click="dispData();"/>
          <mx:Text id="fileContents_txt" x="10" y="326"/>
          <!-- Define custom Strokes. -->
        <mx:Stroke id = "s1" color="blue" weight="2"/>
          <mx:LineChart  id="linechart1"   height="286" width="385"
                paddingLeft="5" paddingRight="5"
                showDataTips="true" dataProvider="{datarecords}" x="566" y="32">
              <mx:horizontalAxis>
                    <mx:CategoryAxis categoryField="Timestamp"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:LineSeries yField="Timestamp"  xField="UpstreamLqi"  interpolateValues="true" form="curve" displayName="Timestamp" lineStroke="{s1}"/>
                </mx:series>
          </mx:LineChart>
          <mx:Button x="406" y="32" label="SaveXML" click="saveXML()"/>
    </mx:Application>

    Um, wrong forum.
    I think you want to ask this question in the Flex forum.

  • Is there a spinner graphic that I can display while generating a CSV?

    I'm using Scott Spendolini's Download to CSV using a before header process to generate the CSV on a page branched to from a button on a previous page. The file takes about a minute to generate before the Save Dialog appears. I'd like to display a spinner graphic until the Save dialog appears when
    apex_application.g_unrecoverable_error := true;
    is hit on the before header proc on the called page. Any suggestions would be appreciated.

    Hi Phil.
    I'm using Scott Spendolini's Download to CSV using a before header process to generate the CSV on a page branched to from a button on a previous page. The file takes about a minute to generate before the Save Dialog appears. I'd like to display a spinner graphic until the Save dialog appears whenapex_application.g_unrecoverable_error := true;
    is hit on the before header proc on the called page. Any suggestions would be appreciated.>
    For how to display progress see https://forums.oracle.com/forums/search.jspa?threadID=&q=display+progress&objID=f137&dateRange=last90days&userID=&numResults=15&rankBy=10001
    If you want the animated image , as your post title seems to suggest, try http://ajaxload.info/
    Cheers,

  • How to display data from local csv files (in a folder on my desktop) in my flex air application using a datagrid?

    Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
        <mx:Label x="280" y="19" text="1. Select Purchase Order"/>
        <mx:List y="45" width="232" horizontalCenter="0"></mx:List>
        <mx:Label x="158" y="242" text="2. Verify Information"/>
        <mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
        <mx:Label x="355" y="606" text="3. Generated PDF"/>
        <mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
    </mx:WindowedApplication>

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

Maybe you are looking for

  • T_code(APP)

    IN automatic payment programme (FBZP), but I wnat each of the transaction code for  EACH the step wise,  T-CODE and WHAT IS THE T-CODE FOR OBCVU, AND OBVU,

  • My extensions preferences changes are gone when I change the theme after I reboot my pc

    If I want to change the preferences of my extensions and the theme of the browser (wether it's a Persona or a custom theme) everything is all right. But if I reboot, my changes are gone. It doesn't happen if I don't change the theme. To sum up: I cha

  • Two itunes, two computers, one doesn't recognize ipod

    i downloaded songs to my itunes on my boyfriend's PC--It's downloaded in my name, purchased with the same credit card info on my Mac itunes--and now I can't transfer those songs to my ipod. The PC won't recognize the ipod, and my mac won't let me tak

  • Keyword Tags PS Elements 8

    How do I stop keyword tags running. I dont want it and it uses too much resource. Can anyone help.

  • Missing rented movie on Apple TV...help???

    We rented a movie last night & can't view it this AM w/o renting it again??? I thought you have 24 hr. access to a rented movie.  Any thoughts?