Write several time in an excel file?

Hi
I'm using a excel file to take back data from GPIB device.
so I need to create an excel file
write the data and this several time in the same seet.
WritableWorkbook workbook = Workbook.createWorkbook(new File(Fo));
         WritableSheet sheet = workbook.createSheet("First Sheet", 0);
       if(new_run==true && allowoverwrite==true){
         Label label = new Label(0, 2, "NEW RUN");
         sheet.addCell(label);
        new_run=false;
   Label label = new Label(0, ww, bonnevar);
         sheet.addCell(label);
          Number number = new Number(1,ww, bonnevalue);
         sheet.addCell(number);
         ww=ww+1;
        workbook.write();
        workbook.close();                          
          catch(Exception ex) {
             JOptionPane.showMessageDialog(null, "Impossible de cr�er le fichier xls", "Erreur", JOptionPane.ERROR_MESSAGE);
           }if i had to write only one value in the excel file it is OK it works.
but if i have to write 2 data and more (i mean i need to enter 2 times in the loop) the first data are deleted and replace by the new one.
i'm affraid it comes from the fact i recreate each time a workbook and a sheet.
but i don't know how to solve my issue.
do you know if it is possible to open an excel file, write data , close the excel file , then reopen the same excel file and add data without erase the pervious one
thanks a lot for your help
BR

bonjour
et oui je suis francais :)
my english is so bad isn't it :)
so effectively there is no loop because the source code i have inserted is a small part of my entire code.
but recursively i come on this part of the code that why i have spoke about a loop.
and each time I want to write something on the excel file, the previous data are erased and replace by the new one....
so if you have any idea so solve this it would be great...
ciao

Similar Messages

  • I saved my Form Central spreadsheet file once as a excel file but it will not allow me to save it a second time as an excel file.  It says that I cannot complete this action because the file me be open in another application, but it is not open in another

    I saved my Form Central spreadsheet file once as a excel file but Forms Central will not allow me to save the file a second time as an excel file.  I am informed that I cannot complete this action because the file me be open in another application, but it is not open in another application. What is the problem, and how do I solve the problem.  Thank you. Jeff

    First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
    You can find it here:
    [Ann] Identify Your InDesign File
    If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
    In regards of the script showing a result for InDesign files higher than CS6:
    CS7 = CC v9
    CS8 = CC v10 = CC-2014 or CC2014.1
    Uwe

  • TS1424 I am trying to download a song and it gets to about 3.5mb and stops, then starts all over again. It has done this several times. Could the file be corrupt?

    I am trying to download a song and it gets to about 3.5mb and stops, then starts all over again. It has done this several times. Could the file be corrupt?

    Turn off the Firewall in System Preferences > Security (or Securtiy & Privacy) > Firewall
    If you have anti virus software installed, you may need to disable that before downloading.
    Restart your Mac and try again.

  • Is there a method to write a ROW @ once to Excel file using OLE2?

    Hi
    I need some help on exporting data from a table to an Excel file. It's
    possible to write values to file cell by cell using Ole2 functions. But
    I prefer if there's a method to write a row at once rather than writing
    cell by cell.
    Please let me know if anyone's aware of a method..
    I guess DDE package has some methods, but since we have already used
    OLE2, would like to know whether any method available in that.
    We can set values to the row at once, using the following
    ole2.set_property(row1, 'Value',1);
    but it will be always the same value in every column
    the above will set '1' for each column in the row..
    Please let me know if there's a method to set different values to
    each column in a row such as
    ole2.set_property(row1, 'Value',1,2,3,4) (not an actual, just an
    example) which will assign '1' to column 1, '2' to column 2 etc..
    We can't TEXT_IO and CSV files since we want to create different multiple tabs in the same work sheet
    It's required to have multiple tabs in the same excel file.
    So using CSV files is not possible
    Regards
    Channa
    Edited by: Channa on Apr 5, 2010 1:59 AM

    Other than importing them into your Mail / Address Book app, no.

  • To write contents in an existing excel file

    Hi All,
    I want to know Using JXL API,how to write the contents in an existing excel file.

    http://www.andykhan.com/jexcelapi/tutorial.html
    PS. JXL is not Java Excel API.

  • Procedure to write Oracle Query Result to Excel file?

    Hi All,
    I have a requirement to write a procedure which will write the result of a Query (select statement) to a Excel file.
    I use a third party tool to do so but it fails when the query fetches more than 65000 records!
    Can someone suggest me a procedure ( may be written in PL/SQL ) which can be used to achieve this task?
    If there is a procedure available readily, can you please share it with me?
    Thanks in advance
    Himanshu Dabir

    There is a ready procedure (actually PL/SQL blocks by Tom Kyte) available at
    http://www.quest-pipelines.com/newsletter-v5/0704_C.htm
    but it also suffers from Microsofts limitation of 65536 rows per sheet.

  • How to write Date/Time property of tdms file

    On the root page of the tdms file, there is a built-in property called "Date/Time" in the first row.
    I would like to use it to save the time stamp when the tdms file is created. But in the help file,
    I only find the following property constant. So, how can I write to the "Date/Time" property field?
    Property
    Constant
    Data Type
    Name
    TDMS_FILE_NAME
    String (char *)
    Description
    TDMS_FILE_DESCRIPTION
    String (char *)
    Title
    TDMS_FILE_TITLE
    String (char *)
    Author
    TDMS_FILE_AUTHOR
    String (char *)
    Thanks for any idea or suggestion.
    Solved!
    Go to Solution.

    Not sure if this is exactly what you want, but have you tried this?
    CVIAbsoluteTime CVItime, *t = NULL;
    TDMSFileHandle deH = 0;
    // Create TDMS file and set some properties
    errChk (TDMS_CreateFileEx (file, TDMS_Streaming2_0, TDMS_ByteOrderNative, 0,"example.tdm", "someText", "title", "author", &deH));
    GetCurrentCVIAbsoluteTime (&CVItime);
    errChk (TDMS_SetFileProperty (deH, "Date/Time", TDMS_Timestamp, CVItime));
    // Save and close file
    errChk (TDMS_SaveFile (deH));
    TDMS_CloseFile (deH);
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Report Generation Toolkit - Write cells to already open Excel file.

    Greetings,
    Does anyone know a way to write numeric cell values to a worksheet in an Excel
    spreadsheet that is already in memory using the Report Generation Toolkit?
    I've found that if the spreadsheet is already in memory and the user has made
    changes to it without saving the changes, when LabVIEW opens the reference to
    the report, the user’s changes are overwritten if they have not been saved
    since LabVIEW opens the last saved version of the spreadsheet.  I'm aware
    that there is a setting to "display alerts" to the user but I'd
    rather not do this.  I would like simply to obtain a reference to the open
    spreadsheet without re-opening the spreadsheet file.
    Thanks in advance!

    Space_Flight wrote:
    > Greetings,
    > Does anyone know a way to write numeric cell values to a worksheet in an Excel
    > spreadsheet that is already in memory using the Report Generation Toolkit?
    >
    > I've found that if the spreadsheet is already in memory and the user has made
    > changes to it without saving the changes, when LabVIEW opens the reference to
    > the report, the user?s changes are overwritten if they have not been saved
    > since LabVIEW opens the last saved version of the spreadsheet.  I'm aware
    > that there is a setting to "display alerts" to the user but I'd
    > rather not do this.  I would like simply to obtain a reference to the open
    > spreadsheet without re-opening the spreadsheet file.
    >
    > Thanks in advance!
    Space_Flight:
    I do not believe this is possible to do with the report generation VIs
    (although I have VERY little experience with these. If you really had
    to do it this way, you could use activeX controls to manually right
    values to cells in an open excel spreadsheet, but this can get rather
    cumbersome. Are users changing the values in the spreadsheet while
    your program is running? Is there maybe a way around this?
    -Ray

  • How can i writ many times in one Excel

    I have a numbers in open excel,and than i want to compar those numbers to the new numbers, if it same the new number to be writ like the same as showing in excel (Abou55).but my probleme is when i am trying to writ the second number the first number desappear
    somone can help me withe sample.
    thank you
    Attachments:
    Abou55.zip ‏66 KB

    Your inner loop interates thru all of the elements of the left column and writes the second column with either the new string value if there is a match, or a "" if there is no match. This loop will step on the previous number every time.
    Your simplest solution is by enclosing the two nodes Range.Value2 in a case statement and execute it only if the compare is true.
    There is also a flaw in the inner loop auto indexing. There will always be only one value in that array. This inner loop serves no purpose and should be removed.
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdef.biz
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Importing date-time data from Excel file

    I am running into problems importing date-times in the format 3/15/2010 9:30:00 PM using SQL Developer. At Step 1 of the Data Import Wizard, the data preview window displays all the date fields as Excel dates (e.g. 40252.89583 instead of 3/15/2010 9:30:00 PM). Can I get SQL Developer to recognize the data in their date-time format, rather than converting them to decimal values?

    When importing from Excel, I haven't found a date format model that would convert their decimal number into an Oracle date. But the following seems to work well:
    1 - Save the Excel page as a CSV file then in the SD import wizard you can enter the date format model for that column.
    2 - In Excel convert that column to text. (Highlight your date column, Choose the "Data" menu item, in the "Data Tools" group choose the "Text to Columns" tool, click next / next / then select the "Text" button, click "Finish" and save your xls) Now in the SD import wizard just enter the date format model that matches the Excel 'text' column with your dates.
    Either way seems to work for me.

  • Trying to recover excel 2011 file from time machine,  all excel file edited after Lion install come back as corrupted.

    file that were not edited since Lion install recover fine.

    file that were not edited since Lion install recover fine.

  • Firefox repeatedly has no bookmarks, no history and will not let me add bookmarks. I have fixed this several times (deleting some sqlite file), but the problem recurs. It's enough to make me give up on firefox. Using iMac with OSX.

    This problem happens upon upgrades, but may have happened between upgrades as well (happened so much I've generally given up on using bookmarks or history with firefox).
    Thanks!

    When you don't have enough storage to perform an operation, then you don't have enough storage.  have you got the 16GB iphone?

  • How to activate another worksheet in excel file and write data into it

    Hi,
    I am writing an automation program to collect test data and write the data to an excel file.
    The excel file has several worksheets and now I can only write data to one sheet. Can anyone please let me know how to activate another worksheet and write data into it? Thank you very much.

    You can do a search in the Example Finder for more Excel VIs.
    They will give you a clearer idea of how to go about doing things in the way you need.
    - Partha
    LabVIEW - Wires that catch bugs!

  • Have tried downloading F 4.0.1 several times on Windows desktop XP2 with "save the file". It appears to download, but never is activated. I this related to MAfee firewall as well as Windows firewall on? How do I inactivate windows firewall emporarily?

    Windows XP2 desktop. Tried downloading F setup 4.0.1 exe several times , asked to save file (both McAfee and windows firewall are on.: can't access windows firewall to inactivate itif this is necessary.. It downloads: but cannot access download: not listed in my apps.

    Hey Guys,
    I managed to fix this issue myself..I can access the home page as normal.
    This is what fixed the issue.
    Step 1 : Un-installed Oracle XE while logged in to the domain. ( Made sure it cleaned all installation files and registry and env variables by cross checking registry as mentioned here .
    Step 2 : Logged in as admin on the local machine ( not domain ) and reinstalled it. Now it works just fine. (Closed all programs - didn’t open any programs..just ran Oracle installation )
    I did install oracle xe logged in as a domain user before ( and my domain is user is part of local administrators) and it all worked just fine. May be it’s a permissions issue ( though I ran oracle installation as admin ) or host name change issue.
    Phew..anyhow..finally it works!!
    Cheers.

  • When I open the Adobe reader file, I have to click several times

       I have a problem in this Adobe Readear program.
    When I open the file, I have to click several times and then the file open.
    It does not open the file at a time.
    I install again and again. But it doen't get better.
    What do I do?
    I would appreciate a prompt reply.

    I don't know what is causing that; all I can do is guess.
    Can you keep Task Manager (Processes tab) open in a smaller window, then double click on a PDF file in another window.  Does AcroRd32.exe come alive for a very short time, then disappear?
    You could also use a Tool like Process Monitor to find out what's going on.  Set the filter to Process Name = AcroRd32.exe before you start.

Maybe you are looking for

  • Why is my bluetooth speaker connected but sound only comes out of the computer speakers?

    My bluetooth speaker (JBL Charge 2) is shown as "connected in the blu tooth section of the task bar. I have also gone to system preferences and the speakers are also shown to be connected and chosen as the main speakers. However, no sound comes out o

  • Flash Player not working on website

    I have been getting complaints that my flash videos on http://www.lakefishingtechniques.com are not working right on safari moble. How can I correct this?

  • Maximum Number Of Records Import Manager can handle.

    Hi Guys, I want to know the maximum number of records Import Manager can import / handle at a time. Thanks in advance . Best Regards, Ramchandra Kalkar.

  • Turn brightness all the way down?

    Is there a way to change the default brightness threshold limits set by Apple when using the F14-F15 keys? I would like to be able to use F14 to black my screen as I can with my G3 iBook. Is there a threshold setting somewhere that could be changed?

  • Testing XSLT in WPC

    I'm wondering what methods folks are using when they are testing out XSLT changes.  It appears as though one must bounce the portal in order for XSLT changes to take affect. Is there an easier way to have a change to the XSLT for a document type take