Replace different values in different cells

Hi,
I am new to LabVIEW and work with an instrument that gets it's settings from an Excel file. I need to change those settings in Excel with LabVIEW. The Excel file is formated in .xls (97-2003 version). The PC has Microsoft Office 2013 installed.
I am using LabVIEW 2014 (64-bit).
Task:
I want to change the values in 3 different cells in an Excel spreadsheet and save the workbook (not SaveAs).
The main vi is saved in the library in the zip file, it is called 'change 3 values in excel.vi'.
The excel file is attached separately.
I don't think it matters where those cells are in the Excel worksheet, the Excel memory seems to keep the cell selection of all cells in mind but replaces the value with the last one mentioned in the last sub vi.
Problem:
1) All cells change to the same value that I define in the third sub vi.
2) Excel asks me for SaveAs and doesn't just save over the existing file.
3) The Excel application doesn't close but I can't seem to figure out why.
Please advice. Help on any of those issues is highly appreciated.
Thank you!
Solved!
Go to Solution.
Attachments:
change the 3 cells.xls ‏26 KB
change 3 values in excel.zip ‏103 KB

Here is how I would do this.  I would use the Report Generation Toolkit (which is included in LabVIEW 2014).  This Example is a simplified version of your task -- you are given the name of an existing Excel Workbook to modify, the index of the Worksheet to use, the Excel Cell address (in Excel format, i.e. A1, for purposes of illustration), and the Cell Value that you want to insert there.
The first function is New Report, which is a slight misnomer, as we are using it as "Replace Report" by wiring in the name of the existing Report, and specifying that we mean an Excel Report (it will open Excel -- if you don't want the Workbook to be visible, open it Minimized).  We next call Excel Get Worksheet (which isn't necessary if we are using the first Worksheet ...).  We use Excel Easy Table to put the Cell Value into the chosedn Excel Cell.  To do this, we first use Excel Get Excel Location to convert, say, B3, to row/column indices (B3 = 1, 2) and bundle this into a Cluster.  We also need to convert the Cell Value into a 2D Table which we do by passing it through two Build Array functions.  Next we Save Report to File using the original Excel Workbook path, and finally we Dispose Report to turn off Excel.
If you had multiple cells you wanted to update, I would bundle Excel Cell and Cell Value into a cluster, build an array of clusters, then put the Excel Easy Table function into a For loop and do the updates one at a time.
This should work extremely quickly -- the entire process should take a fraction of a second.
Bob Schor

Similar Messages

  • Customisation for PO Release (different Values for different Doc Types)

    Dear Experts,
    I need to configure for PO release procedure where in the Characteristics would be Plant (2 Plants), Doc Type (3 types - Standard PO, Imports PO & Capital PO) and Value (2 stage release: 0-100000 & >100000 INR for Std PO, 0-200000 & >200000 INR for Imports PO and 0-300000 & >300000 INR for Capital PO).
    Please let me know where I shoud define the different Values for different Docs for the Release procedure to work properly.
    Or let me know the entire procedure for achieving the same.
    Regards,
    MNP

    Hi MNP,
    You have to create different CLASSes in IMG with the possible combination of different characteristics,
    EX. CLASS EKKO11 - Plant A, Doc type- Std PO, Value- 0-100000 & >100000 INR
          CLASS EKKO22-  Plant A, Doc type- Import PO, Value-  0-200000 & >200000 INR
          CLASS EKKO33-  Plant A, Doc type- Capital PO, Value-  0-300000 & >300000 INR  and same for other plant
    then assign these classes to the respective Release group.
    regards,
    Pravin

  • Column with dropdown with different values in each cell

    Hello,
    I have a Table and one of the columns contains a dropdown list (dropdownbykey). My problem is that the list of values for each drop down element is different because it depends on the value in the rest of the row cells. Obviously I need to calculate the values dynamically at runtime.
    I have created a context node and linked it to the table columns, one of the attributes in the node is linked to the 'selectedKey' property of the dropdown. Then in my code I try to give the list of values to this attribute using the method set_attribute_value_set from the if_wd_context_node_info interface. The process it's explained in the DEMO_UIEL_STD_SELECTION component.
    But I only get the same values for each row.
    I would like to know if it's possible to have dropdowns with different values in the same column of a Table, and if so any indication of how to do that.
    Best regards,

    Hello Javier,
    unfortunately you cannot use dropdown by key if you want to have different dropdowns per line of your table.
    Instead you will need to use dropdown by index, and bind your dropdown to a subnode of the table element (ensure that this is a non-singleton node).
    To make life easier for yourself, I would also have an attribute in your main structure that holds the selected value of the dropdown by index - update this value on any "onSelect" action of the dropdown by index.
    e.g. for a table that holds addresses:
    Context Node Address:
    attribute street
    attribute city
    attribute country
    attribute region
    subnode regionlist
    ...attribute regionkey
    ...attribute region_text
    table - bound to node address
    input field bound to street
    input field bound to city
    dropdown by key bound to country (onSelect event populates subnode regionlist)
    dropdown by index bound to subnode regionlist, text bound to region text, (onSelect event populates address element attribute region with key field of selected element).
    I hope this helps,
    Chris

  • Measuring different values with different intervals

    I have a program which is measuring temperatures every second (or how often I want it to) and writes this to a file. But now I want it to open a digital line to measure the current through a resistant and if the current is higher than a certain limit, the program should open another digital line. But I don't want it to open the digital line/measure the current so often because the resistant will get hot, so I want it to measure maybe every 15 minutes. How should I make the program measure these values in different intervals?
    I am really a beginner in labVIEW, and i have no clue how to do this. If someone could give me any advice, even if it's only about where i can look to find a solution, I would be very greatful.

    On your front panel, you can have two numerics: one is the interval between temperature reads, the other is the interval between digital reads. If intervals are on the order of seconds (not milliseconds) you're probably better off checking the interval using Get Date/Time in Seconds rather than using Wait (ms). Add shift registers to your loop to save the last time read (one shift register for last temp read, another for last digital read). Each time through the loop, check if the current time (from Get Date/Time in Seconds on the Time & Dialog palette) is more than the specified interval from the last time read. If it is, take the reading and save the current time as the last time read to the shift register. Use separate case structures for the temperature
    reading and the digital reading.
    See the attached LabView 6.1 example.
    Attachments:
    ReadAtDifferentIntervals.vi ‏35 KB

  • Settlement  inv. measure to Auc: different values in different depr. areas

    Hi!
    Due to IAS/IFRS principles we have to manage different Asset values for a Local Gaap and IAS depreciation areas. We know that is possible to use transaction types limited to each single area to post different values directly in AA.
    We'd like to know if there is a way to settle different values from investment measures to AuC's different areas; since in customizing is possible to define only one specific internal transaction type for settlement from investment measures to AuC. We cannot use Key capitalization, since we are not using different cost elements.
    We are also considering to use custom enhancement.
    Do you have any suggestions about it?
    Thanks in advance!
    Giovanna

    Hi,
    Could you please let me know if this is solved? If yes the approach you have taken to solve this. We have a similar kind of requirement.
    Thanks,
    Anuradha

  • CALCLATED KF SHOWING DIFFERENT VALUES FOR DIFFERENT CURRENCY TYPES

    Hi Experts
    When I am executing the query( On a Multi provider) with the selection of Company code, controlling area, WBS ELEMENT, currency type I am seeing two different values (XXXX EUROS and YYYY EUROS)for a formula for total variable cost when i select two different currency types( CONTROLLING AREA AND GROUP CURRENCY)
    I have two currency types called CONTROLLING AREA CURRENCY and GROUP CURRENCY(BOTH IN EUROS).
    This WBS  element is not having any sales document.How can I see the exact value for this WBS element in the R3 side.
    Is there any possibility that the same dataelement TOTAL VARIABLE COST have different values when i execute with differnt currency types in the selection screen.
    In what approach can i proceed from R3 side  to the query to solve this issue. on the R3 side when i see in FB03 (settlement posting) for this WBS it is balanced. I am seeing only partial posting for this in the Query
    Could any one help me to solve this.
    Thanks in Advance
    Best regards

    Hi Rajesh,
    I guess the holiday which was configured in Holiday calendar (Holi) is not declared as Paid holiday in Public Holidays-Holiday Calendar.
    Goto SCAL - choose Public Holiday - change mode - look for the holiday (Holi) configured - change mode again - lookout for 'Public Holiday Class' and see whether ' 1 ' is maintained there, if not maintained, type 1 there and save it.
    PS (1 - Ordinary Public Holiday....i,e paid holiday).
    Now go to PT01 and generate WSR. This will sort out your issue.
    If the above is not working,
    I guess there are different PSA/ESG grouping for the employees and maybe their Holiday Calendar itself is different. check out whether the PSA and ESG grouping in Time Mgmt is same or different for those employees for whom the paid holiday is not getting generated and also check out the Holiday Calendar for these set of employees and try the above given solution there.
    Hope this helps.
    regards,
    Santhosh
    Edited by: Santhosh on Mar 31, 2009 11:34 AM

  • Stat machine workflow task workflow status different values on different state activity(Approval level)

    i have developed the State machine workflow in which i am using default workflow task
    i have added one status dropdown and that is having approve or reject that i set using workflow task drop down values
    now my requirement is that when my workflow goes to different approval i need to have different status values in dropdown
    for example
    on manager approval state activity i need to add additional status value forward to legal
    but when it moved to next activity this task status field should show only approve and reject
    in summary i need to have different status values for workflow task when it moved to different state activity(approval levels)
    can we set these status field of task for state machine workflow programtically as well like for different approval level of task i need different status to be set for the dropdown of task status field
    MCTS,ITIL

    Hi Shahid Siddique,
    I have seen a similar thread from you about this issue, create custom form for the seperate form is a considerable workaround, you can have a check whether it works.
    http://social.technet.microsoft.com/Forums/en-US/9baa0c32-1cde-4c58-aa7c-3568ccf0cdc9/different-approval-level-of-task-i-need-different-status-to-be-set-for-the-dropdown-of-task-status?forum=sharepointdevelopmentprevious
    Thanks,
    Qiao Wei
    TechNet Community Support

  • TRANSLATE LOWER-CASE statement returns different values in different systems

    Hi Experts,
         I encountered the following problem while debugging the print program of an Adobe Form, which has the below-mentioned line of code:-
    TRANSLATE v_var1 TO LOWER CASE.
    The variable v_var1 is of type MSEHT whose basic type is CHAR with length 10.
    The incoming variable, v_var1 has the value 'ШT', which is the upper-case Russian equivalent of the Unit Of Measure - ST.
         In the Production system, after the execution of the statement, the value v_var1 changes to 'шт'. But in the Development and Testing systems, which also have the same code as the Production system, the value v_var1 changes to 'шt'. In all the three systems, I had logged in the same login language('E'). The same problem remains when I log-in in Russian('R'). The text gets reflected in the Adobe forms and there aren't any JavaScript/FormCalc conditions on the particular window to change the font/case. The user wants 'шт' to be displayed (as is being displayed now) in the Prod. But since I'm not able make the same appear in the testing system, they are not confident to transport the changes to the prod.
         In the help documentation of TRANSLATE, I found that the "text environment" is a factor that affects TRANSLATE statements and could be set by the statement
         SET LOCALE LANGUAGE lang.
         which will basically change the system language. There aren't any SET LOCALE LANGUAGE statements in the Print program. I can hard-code and display it but I would like to know alternate solutions. Is it because of any system-specific font/text setting?

    Hi David,
    perhaps the systems got different codepages. This may cause the different.
    Just another suggestion.
    Regards
    Florian

  • ABAP WebDynpro: Table cells with different values.

    Hello,
    I am not sure how the following can be achieved.
    I have a table with 10 rows in it. First column should have different values in cells (static value that do not come from anywhere). For example, colors: black, green, yellow, etc.
    I inserted a table column. In that column I inserted a Cell Editor of type TextView. If I define a 'text' property of this element than it marks all cells in this column with this text. I need to assign different values to each cell.
    How can this be done?
    Thank you.

    Probably you should post this the Web Dynpro Forum
    Web Dynpro Java
    Regards,
    Ravi
    Note : Please close this thread.

  • Asset Activation with different values in dep. areas via CJ88

    Hi,
    I would like to activate an asset via CJ88 from an AuC.
    The challenge is that I would like to activate different values in different depreciaton areas.
    I have seen that the AuC uses transaction types 338/339 for the transfer posting. In this transactions types it is possible to choose transactions types for the transer posting for the new asset which is currently 331/336. What I have done is that I copied 331/336 to Z31/Z36 and adapted them so that its possible to chosse the values for the different dep. areas. I also replaced 331/336 in the types 338/339.
    But when I run CJ88, it still takes 331/336....
    Any idea? Is my approach possible? Any other Idea?
    Thanks and best regards,
    Sebastian

    Hi Sebastian
    Assume you want to settle 100 to Dep Area 01 and 120 to Area 15
    During initial settlement, let the system settle 100 to both using 331/336
    You make a copy of them and limit the Z trans type to Dep Area 15 alone.. Then post 20 USD to Dep Area 15 using ABSO
    Br. Ajay M

  • Mass changes of Material Master field with different values

    Hi,
    How to change a field in Material Master for more than thousand materials. I think MM17 can only be used for mass changes of materials with same values. I need to upload different values for different materials. Is there any other way to do this.
    Thanks,
    K R Vishnu Kumar

    Hi Kumar.
    I think you have to use LSMW for mass updation for Material Master fields with different values.
    Regards,
    Rahul.

  • Problem in updating value at different time interval

    Hello,
    Can anyonce suggest me how to update different value at different time interval.
    I want to use only one while loop but I should be able to send data at different rate.
    Eg:- I have 3 input ,10,20,30
    I need to give output 10 at every 5 ms
    20 at every 10th sec
    30th at every 13th sec.
    so my output should be
    10 at 5th sec
    10 at 10 sec
    20 at 10th sec
    30th at 13th sec.
    Please let me know if anyone has solution for it.

    Is this under windows on in a realtime system?
    In the varous posts, you are sometimes talking about milliseconds, sometimes about seconds
    You could run a timed loop at 5ms time and use quotient and remainder for each multiple with three parallel case structures.
    Here's a possible solution for the case:
    output 10 at every 5 ms
    20 at every 10th sec
    30th at every 13th sec.
    as in the original post...
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    VariousTimes.png ‏8 KB

  • Update Work Process - Different value in SM51 & TU02...which is correct?

    Hi,
    i am checking update work process configured in the system.
    In SM51, i am getting 36 update work process but when i checked it through transaction
    TU02 -> Active parameter, i found the parameter rdisp/wp_no_vb value is 16.
    Am surprised to see the different value at different place, how its possible.
    which is true, how many update work process is configured in the system?
    regards,
    Rakesh

    Hello  Rakesh Ranjan,
    We all realized that you already solved the problem but unfortunately you closed this message without saying anything, what had actually happened and how you solved this problem... if you don´t mind share with all community (so that in future other users can solve the same situation with this post!
    Best regards,
    João Dimas - Portugal

  • Different JComboBox in different Cells in a JTable

    Hi:
    I would like to make a JTable whose content would be several JBox with different values each one. That is to say, a double-column table with the value name in the first column and a range of possible values in the second column,
    Despite my efforts I was not able to do that. Every example that I found in the Web does not let different JComboBox per cell. They run with the same cell and values for each column.
    Can anybody help me?
    Thanks in advance.
    Carlos

    Here is an example that is based on camickr´s example:
    import javax.swing.DefaultCellEditor;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.table.*;
    import javax.swing.JTable;
    import java.util.ArrayList;
    import javax.swing.DefaultCellEditor;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    public class TableCell extends JFrame
         JComboBox comboBox1 = new JComboBox();
         JComboBox comboBox2 = new JComboBox();
         JTable table;
         ArrayList<DefaultCellEditor> editors = new ArrayList<DefaultCellEditor>();
         TableCell()
              comboBox1.addItem("Tennis");
              comboBox1.addItem("Fotboll");
              comboBox1.addItem("Baseball");
              comboBox1.addItem("Handboll");
              comboBox2.addItem("USA");
              comboBox2.addItem("Brazil");
              comboBox2.addItem("Australia");
              comboBox2.addItem("China");
              comboBox2.addItem("Egypt");
              DefaultCellEditor dce1 = new DefaultCellEditor(comboBox1);
              DefaultCellEditor dce2 = new DefaultCellEditor(comboBox2);
              editors.add(dce1);
              editors.add(dce2);
              final JTable table = new JTable()
              { // anonym innerklass
                   private Class editingClass;
                   public TableCellRenderer getCellRenderer(int row, int column)
                        editingClass = null;
                        int modelColumn = convertColumnIndexToModel(column);
                        int modelRow = convertRowIndexToModel(row);
                        if (modelColumn == 1)
                             Class rowClass = getModel().getValueAt(row, modelColumn).getClass();
                             return getDefaultRenderer( rowClass );
                        else
                             return super.getCellRenderer(row, column);
                   public TableCellEditor getCellEditor(int row, int column)
                        editingClass = null;
                        int modelColumn = convertColumnIndexToModel(column);
                        int modelRow = convertRowIndexToModel(row);
                        if (modelColumn == 1)
                             if (modelRow == 5)     // cell number 5 in column 1 which is going to show the combobox
                                  return (DefaultCellEditor) editors.get(0);
                             if (modelRow == 6)     // cell number 6 in column 1 which is going to show the combobox
                                  return (DefaultCellEditor) editors.get(1);
                             else
                                  editingClass = getModel().getValueAt(modelRow, modelColumn).getClass();
                                  return getDefaultEditor( editingClass );
                        else
                             return super.getCellEditor(row, column);
              table.setModel(new javax.swing.table.DefaultTableModel
                   new Object [][]
                          {"String", "I'm a string"},
                        {"Date", new Date()},
                        {"Integer", new Integer(123)},
                        {"Double", new Double(123.45)},
                        {"Boolean", Boolean.TRUE},
                        {"Combobox 1", "COMBOBOX 1"},
                        {"Combobox 2", "COMBOBOX 2"}
                   new String [] { "Attribute", "Data" }
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              TableCell frame = new TableCell();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • PO value and GR account value is different ??

    Hii
    Can anybody explain me ,
    In some PO , GR value is different from PO value.
    If we compare with PO value , after GR, the value generated in account document in MIGO is less than the PO value ??
    What is rout couse for the above problem ??
    How this 'll occur in some case ..??
    Thnaks
    SAP-MM

    Hi,
    Procurement of Excisable Material from a 2nd Stage Dealer is diffent that normal procurement ( In india when you have CIN)
    Example -
    Assumptions : Material price (inclusive of ED & Ecess) : 100
                            VAT  (Deductible) @ 4%                        :     4
    Amount Payable to Vendor                     :  104.00
    Actual Excise Invoice received for amount                   :  25
    Actual Ecess amount                             :  00.50
    Total Cenvat Recd.                            :  25.50          
    Amount to be loaded on Inventory                        :  74.50
    1.While creation of PO for such cases maintain the u201CZerou201D tax code u2013 usually V0.
    2.  While doing GR through MIGO, enter the actual Excise duty & Education Cess     in the respective cells of Excise Tab in Item details. Also ensure to change the Base value to [PO value u2013 (BED+Ecess)]
    3. In the Excise Header Tab maintain Excise Invoice No. and  Date & click on the icon 
    Check on MRP Indicator. This check ensures that the value going on inventory is after deducting the Excise Duty & ECess.
    So amount on stock account will be 74.50 and not 100.
    This is because when you buy from delear you do not know the exact amount of duties but delear tells you the final amount so you create PO with final amount and during Gr time when vendor gives you the split of base value and excise you follow the above steps.
    Regards,
    Shailesh Mackwan

Maybe you are looking for

  • Use of PL/SQL to populate table columns from XML data file

    I'm trying to find the easiest way to transfer data from a flat file that is in XML format into a traditional Oracle table. Not retaining the XML but actually map an XML element to a column so standard SQL, Forms, Reports, etc can access like it was

  • Help needed in MV Query

    Hello, I have created a MV as follows: CREATE MATERIALIZED VIEW Test1_MV BUILD IMMEDIATE REFRESH COMPLETE ENABLE QUERY REWRITE AS SELECT b.Customer_ID, j.MONTH_END_DATE, (AVG(sum(COUNT *(case when (m.DIM1_DSC ='ABC') then 1 else 0 end)))OVER (ORDER B

  • Help me btabz

    so im pretty sure that in order to fix my ipod i just need to restore it ive done all of the other things they recommend that fix most problems. ive completed the step b step directions to restore my ipod including forcing it into disk mode but no ma

  • Moving all iTunes' music to another Mac OS X account on the same system?

    Hello. I accidently have all the songs under the wrong account in Mac OS X 10.5.5 because I copied all songs from an old iPod Nano to a new MacBook Pro's HDD and a clean iTunes with Senuti program. How can I move them to the other account on the HDD?

  • Jhs 10.1.2 : ampersand eacute; converted to ampersand amp;eacute;

    Hello all, First of all congratulations to the whole team of JHeadstart for the great job you are doing. I am evaluating different products to generate standard to complex database interfaces and Jhs looks very promising to me. Now on with the troubl