Is it possible to insert data into two Excel worksheets using Report Generation Toolkit?

I'm using the toolkit to insert data into two separate worksheets in Excel using named cells. The problem is that it tends to favor one sheet or the other. In other words, one sheet will have data and the other no data and vice versa. (Sometimes I get data in both sheets.) Is there something I can do to clear this up or is what I'm trying to do unreasonable? I would like to use two worksheets so one sheet receives text and data. The other sheet is used to format the data into a printable report. (i.e. using Excel's CONCATENATE function) The second (report) sheet is also used to receive plots (JPEG files) from LabVIEW. I'd send the plot images to the first sheet, but I can
not see a way to automatically transfer images from sheet to sheet. I'm using LV 7.1, Win2000 and Toolkit v.1.0.1

Hi,
You can use the "Excel Get Worksheet.vi" under All Functions >> Report Generation >> Excel Specific >> Excel General to specify a particular worksheet as the current worksheet. Then, you can specify which worksheet you want to write to in your VI.
Let me know if you have any further questions and good luck!
Kileen C.
NI

Similar Messages

  • How to get data from an existing Excel file using report generation toolkit

    I'm trying to use the Excel Get Data vi from the report generation toolkit, but i can't figure out how to turn a browsable path into the right type for the VI.  I've tried using the New Report.vi, but that doesn't work unless you use a template.  It won't open an existing excel file and make it an open report to pull data from.
    Essentially, i have a bunch of excel files that have data in them and i want to use a VI to analyze the data.  So, i'm trying to pull in all the data directly from the excel file so i don't have to reproscess them all into text so i can use the more standard spreadsheet VIs.  But to even convert the excel file programtically in labview won't i still need to be able to open the excel file and get the data?
    Solved!
    Go to Solution.

    I C.
    Got it,
    the reason why I can view it using my Excel file because its in .CSV.
    I open Microsoft Excel to open .CSV file.
    But you can also open .csv file with notepad.
    So, you cannot open .xls with Read Spreadsheet File
    I learn something everyday
    Best regards,
    Krispiekream

  • How to save to data into another file in the Report Generation Toolkit

    I read a doc template and wirte many data and bmp into it. I want to create a new doc file with my own name,
    But in my test, data will be writen into my template. If user don't notice it, my template will be overriden. Can
    I save to a new file in my program? please help me about it.
    Thanks.
    br

    HI, NIhuyu
    thank your answer.
    I will try it.
    Can you tell me the meaning of star out and end out of vi?
    I am not clear about it.
    Thank your very much.
    br

  • Is it possible to insert data into a MySQL database with Java?

    Hello everyone!
    I would like to know, if it's possible to insert data into a MySQL database, with a JFrame inside a servlet?
    When the JFrame is first created it calls this method:
         * Connects the servlet with the MySQL database.
        private void connect(){
            try{
                Class.forName("com.mysql.jdbc.Driver");
                connection = DriverManager.getConnection(
                        "jdbc:mysql://localhost:3306/data", "root", "omfg123");
            }catch(ClassNotFoundException cnfe){
                cnfe.printStackTrace();
            }catch(SQLException sqle){
                sqle.printStackTrace();
        }Then, when you click the "Add" button, it executes this code:
                add.addActionListener(new ActionListener(){
                    @Override
                    public void actionPerformed(ActionEvent ae){
                        String employee = employeeName.getText();
                        String[] args = employee.split(" ");
                        firstName = args[0];
                        lastName = args[1];
                        execute();
                });And this is my "execute()" method:
         * Connects the servlet with the MySQL database.
         * - And executes the SQL queries.
        private void execute(){
            try{
                PreparedStatement statement = connection.prepareStatement("insert" +
                        " into employees values(" + firstName + ", " + lastName
                        + ")");
                ResultSet result = statement.executeQuery();
                String fullName = firstName + " " + lastName;
                printer.write("Employee " + fullName + " added.</br>");
            }catch(SQLException sqle){
                sqle.printStackTrace();
        }But when I click the "Add" button, nothing happens.

    This is what I use to insert into mysql. It works on windows.
    try {
                Class.forName("com.mysql.jdbc.Driver");
                String connectionUrl = "jdbc:mysql://" + loadip + "/custsig?" +
                        "user=root&password=";
                Connection con = DriverManager.getConnection(connectionUrl);
                newproc = jTextField1.getText();
                newsoft = jTextField2.getText();
                newdeb = jTextField3.getText();
                newcust = jTextField4.getText();
                if (newcust.equals("")) {
                    errorsig12 = 1;
                    jLabel1.setForeground(new java.awt.Color(255, 0, 0));
                } else if (newsoft.equals("")) {
                    errorsig12 = 1;
                    jLabel2.setForeground(new java.awt.Color(0, 0, 0));
                } else if (newproc.equals("")) {
                    errorsig12 = 1;
                    jLabel3.setForeground(new java.awt.Color(0, 0, 0));
                } else if (newdeb.equals("")) {
                    errorsig12 = 1;
                    jLabel4.setForeground(new java.awt.Color(0, 0, 0));
                if (errorsig12 == 0) {
                    PreparedStatement ps = con.prepareStatement("insert into customer set cust_name = ?,  software = ?, processor = ?, debit = ?");
                    ps.setString(4, newdeb);
                    ps.setString(3, newproc);
                    ps.setString(2, newsoft);
                    ps.setString(1, newcust);
                    int rs = ps.executeUpdate();
            } catch (SQLException eg) {
                System.out.println("SQL Exception: " + eg.toString());
            } catch (ClassNotFoundException cE) {
                System.out.println("Class Not Found Exception: " + cE.toString());
            }

  • How to insert data into two tables at once using XSJS

    Hello Experts,
    My requirement is to insert data into two tables at once. I have a XS JS app and want to update these tables via xsjs. How can I do this ?
    Is there any mechanism like sql 'transactions' also in Hana ? If yes, how can I call it via xsjs ? If not, what are the ways to populate two different tables at once.
    Please advice. Any help is really appreciated.
    Thanks !

    There is nothing special about inserting into two tables at once in XSJS. Just issue two separate SQL Statements.  Don't execute the COMMIT until after both commands.  That way they are all one transaction.

  • How to insert data into two tables linke with foreign key..

    I have two tables
    1)EMP(emp_ID,username,emp_type_code)
    emp_ID is primary key, emp_type_code is a foreign key references emptype table.
    2)emptype(emp_type_code,emp_type_descripton)
    emp_type_code is primary key
    Could anyone help me ..how to insert data into EMP table. How to insert data into two tables linke with foreign key..

    CREATE TABLE "CATDB"."DWDIMUSER"
    "USER_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_ID" NUMBER(10,0),
    "FULLNAME" VARCHAR2(20 BYTE),
    "FNAME" VARCHAR2(20 BYTE),
    "LNAME" VARCHAR2(20 BYTE),
    "USER_SUBTYPE" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMUSER_PK" PRIMARY KEY ("USER_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE,
    CONSTRAINT "DIMUSER_DIMSPECIALTY_FK" FOREIGN KEY ("SPECIALTY_ID") REFERENCES "CATDB"."DWDIMSPECIALTY" ("SPECIALTY_ID") DISABLE
    CREATE TABLE "CATDB"."DIMSPECIALTY"
    "SPECIALTY_ID" NUMBER(10,0) NOT NULL ENABLE,
    "SPECIALTY_NAME" VARCHAR2(100 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("SPECIALTY_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    INSERT INTO DIMUSER (FullName, FNAME, LNAME, USER_TYPE, USER_SUBTYPE)
    SELECT DISTINCT
    Engineer AS FullName,
    regexp_substr(Engineer , '[^,| ]+', 1, 1) as FName,
    regexp_substr(Engineer , '[^,| ]+', 1, 2) as LName ,
    'Engineer'
    FROM EMPLOYEELOOKUP;
    INSERT INTO DIMSPECIALTY (SPECIALTY_NAME)
    SELECT DISTINCT SPECIALITY
    FROM EMPLOYEELOOKUP;
    COMMIT;
    CREATE TABLE employeelookup ...IS A TABLE THAT HAS ALL THE DATA NEDED TO BE FILLED IN BOTHE TABLES...
    CREATE TABLE "CATDB"."EMPLOYEELOOKUP"
    "EMPLOYEELOOKUP_ID" NUMBER(10,0) NOT NULL ENABLE,
    "ENGINEER" VARCHAR2(25 BYTE),
    "SPECIALTY" VARCHAR2(20 BYTE),
    CONSTRAINT "DIMSPECIALTY_PK" PRIMARY KEY ("EMPLOYEELOOKUP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CATDB" ENABLE
    DATA IN EMPLOYEELOOKUP
    Engineer, Specialty,
    John, Dow, Electronis,
    Dow, Jons, Technician
    Stan Smithers Sales
    Mark, Richards Marketing
    Jenny, Lane Marketing
    John, Lee Sales
    I NEED TO LOAD THE FOREIGN KEY IN DIMUSER FROM THE DIMSPECIALTY TABLE?
    BY USING THE LOOKUP TABLE TO MARCH THE NAMES UNDER THE Engineer COLUMN, SPECIALTY COLUMNE DISTICTIVLY BY JOINING THE DIMSPECILTY TO RISTIVE THE PRIMARY KEY AND FILL IT IN THE DIMUSER TABLE AS A FOREIGNE KEY.

  • Cannot insert date into numbers 3.1 using ctl shift d

    can no longer insert date into numbers 3.1 using control shift d

    Hi Gerald,
    If you are inserting the current date a lot, and want a simple keyboard combination to do it rather than fiddling with formulas in Numbers, here is an easy way that takes advantage of some neat functionality built into every Mac that is much easier than it sounds.  It requires the investment of just a few minutes of time to make a one-time setup of an "Automator service."  Thereafter inserting a date is just a menu pick or keyboard combination.
    1. Open Automator (in your applications folder) and choose Service as document type:
    2. Drag 'Run AppleScript' action from the left over into the right pane:
    3. Copy the following script and paste it into the right pane (replacing all of the default text in the pane):
    on run
              set date_ to ((current date) as string)
      set the clipboard to the date_
              tell application "Numbers"
      activate
                        tell application "System Events"
      keystroke "v" using {option down, shift down, command down}
                        end tell
              end tell
    end run
    4. At the top of the right pane choose 'no input' for 'Service receives' and 'Numbers.app' for 'in'. (On my machine I have the old Numbers renamed to Numbers09 so the script doesn't get confused).
    After you click the hammer icon (to "compile") your right panel should now look like this:
    5. Name the service "Today" or similar and move it to the Library > Services folder. (If it doesn't save automatically to that location you can File > Export in Automator, choose the 'Desktop' for 'Where', then in Finder open a new window and hold down the option key and choose Go > Library > Services, and drag Today.workflow from the Desktop into that folder.)
    That's it. The service is ready to go. Thereafter, whenever you want to insert the current date, just pick Today from the Services menu:
    6. Or, to make this even easier to access, choose Services Preferences and assign a keyboard shortcut to the service:
    SG
    Troubleshooting notes:
    This should "just work." But if it doesn't for some reason, try one or more of the following:
    - Rename the old Numbers (the one in the iWork '09 folder under Applications) to Numbers09 or similar.
    - Check to make sure you aren't using the same keyboard shortcut for something else.
    - Remove 'Day of the week' from your "Full" date format in System Preferences > Language & Region.
    - Try revising permissions under System Preferences > Security & Privacy > Accessibility > Privacy.

  • How to write data which i am reading from spectrum in excel using Report Generation toolkit.

    Hello All,
     I wrote code for reading data from Spectrum analyzer and also for writing in excel using report generation toolkit. When i run program values get read and excel sheet opens also but i cant see anything written in it.
    So if anyone can help me in this i will be very gald. I am attaching screenshot of my program and also attaching .vi file. As i am using drivers you can see some of vi.
    Thanking You,
    Pallavi 
    Solved!
    Go to Solution.
    Attachments:
    Channel_Power.jpg ‏123 KB
    Channel Power_Toolkit.vi ‏64 KB

    Hi Palavi,
    you try to select a specific worksheet what is not existing, therefore just select "Channel Power" (and not Power Channel) and it should work for you.
    Regards,
    Tobias

  • Help needed with SQL to split huge data into two excel or text files.

    Hi,
    I have a table which has around 1850000 records. I want to split the data into two sets and import the data in .txt or execl file.
    How can i break upthe records using rownum or any thing
    select * from tablename where rownum<940000 fetched some records
    but
    when i gave select * from tablename where rownum>940000 it was not fetching records.
    Guideme

    when i gave select * from tablename where rownum>940000 it was not fetching records.try this
    select * from (select tablename.*, rownum rn from tablename) where rn >940000

  • How to insert date into ms access database using sql query in servlet

    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
      plz help me
    thanx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    bhavishya wrote:
    sir all thing is working well now only tell me how we can insert date into ms access database which is input by user .
    insert into db2(bookname,studentname,date) values('"+bname+"','"+sname+"',date_format)";{code}
    or either the system date is inserted with query .
    plz help me
    thanxAnd that SQL statement is another reason to use PreparedStatement. I assume bname and sname are input from some form? Well, if that's the case, simply inserting them into SQL by simple String concatenation is just begging for all sorts of problems. What if there is an apostrophe in the entry? Broken Statement. Worse, it's a wide open invitation to an SQL Injection attack.

  • Insert data into two related tables in one transaction

    Hi all,
    I’ve got problem with developing functionality.
    Background:
    I’ve got two tables: OFFER_HEADER and OFFER_CONTENT
    For now, user has to insert and commit the OFFER_HEADER(single-row view), then content becomes reachable and OFFER_CONTENT(multi-row view) can be filled. It is being done by choosing record from PRODUCTS form and inserting values into OFFER_CONTENT. Product data can be modified on the CONTENT form canvas.
    My goal:
    I know that is not convenient way to implement the functionality. I want to insert all the data(header and content) in one transaction. What is the best way to do it?
    Thanks in advance,
    Best Regards,
    Bartek

    1. User is on the OFFER_CONTENT canvasOk
    2. User presses ‘+’ buttonOk
    3. On the screen is displayer PRODUCT list
    4. User set focus on desired product
    5. Using popup menu user choose ‘Add’ option
    6. PRODUCT list is being closedSo, the functionlatity is like a LoV?
    7. OFFER_CONTENT is being shown with set of information from the productOk, you would either take the values directly from the fields of the PRODUCT-list and copy them into the OFFER_CONTENT-fields, or you just get something like the PRODUCT-ID from your PRODUCT-list and use a SELECT to read the product-details into the OFFER_CONTENT-block
    8. User can then manually change desired elements of the recordOk.
    So, where do you have the need to do an INSERT in your scenario?

  • Inserting data into two tables

    hi
    i have two tables
    table1
    Column1.........................................     Column2
    Primary key     ........................................Foreign key ref to column2 in table2
    table2
    col1............................................ ............... col2
    foriegn key ref to col1 in tab1 ........................ primary key
    now my question is how to insert data in to the two tables
    thanks in advance
    Edited by: [email protected] on Feb 15, 2009 12:13 PM

    user_7000005 wrote:
    now my question is how to insert data in to the two tablesBy defining the foreign keys as deferrable:
    SQL> create table table1
      2  ( col1 int primary key
      3  , col2 int
      4  )
      5  /
    Table created.
    SQL> create table table2
      2  ( col1 int
      3  , col2 int primary key
      4  )
      5  /
    Table created.
    SQL> alter table table1 add constraint c1 foreign key (col2) references table2(col2) deferrable initially deferred
      2  /
    Table altered.
    SQL> alter table table2 add constraint c2 foreign key (col1) references table1(col1) deferrable initially deferred
      2  /
    Table altered.
    SQL> insert into table1 values (1,1)
      2  /
    1 row created.
    SQL> insert into table2 values (1,1)
      2  /
    1 row created.
    SQL> commit
      2  /
    Commit complete.Regards,
    Rob.

  • How to insert data into a  Ztable by using module pool programming??

    Hi,
    I am new to ABAP, Actually I have made a Ztable now I want to insert data by using the module pool programming. In which there are all field in the first screen and there is a save button. So when ever i press SAVE button it shud update the Ztable with new entries.But actually I am not getting How can i update that??can you please send me the code for inserting data.
    Thanks in Advance.
    Edited by: Swapna Ram on Feb 17, 2008 12:01 AM

    Swapna,
    Check this thread...
    Custom Table updation thru table control
    ALso check this..
    Dialog programming

  • How to insert data into two different lists in sharepoint 2010

    I have a page containing a dropdown list having two departments like IT, HR.
    If i select HR, one input form will display for filling HR related info, these i need to store in HR list.
    In the same way for other dept through custom coding.
    someone help me on this

    Hello
    chiranjeevi avala
    I think You can do it using event listener on Item Creation event of your HR List and put your functionality to add elements in IT list over their.
    for more info check this link:
    http://msdn.microsoft.com/en-us/library/office/ms437502(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/gg749858(v=office.14).aspx
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • Inserting data into subtypes by making use of the super type

    Dear All,
    Let's say I have the following statements defining two object types and create two tables for them:
    create type t1 as object(x number) not final;
    create type t2 under t1(y number);
    create table t1t of t1;
    create table t2t of t2;
    I know I can use insert into t2t values(t2(12,12)) to get a new row.
    However, let's say I have run an insert into t1t values(t1(12)) and I want to make use of that object in the insert for t2t (something like
    insert into t2t values(t1value,12)). Is this possible?
    Jim

    >
    That works, but do we need to repeat all the data in t1's constructor? In the trivial example it is easy because t1 has a single argument but if you are meant to be typing everythinh again, you might as well do the full insert. Is there not something that will give you the value of the object you need (something like select value(e) from t1...)?
    Another idea that I am going to try is various member methods so that if you know the ID of the superclass objects you get the information; still can not beleive there is no function that will give me the values of the superclass.
    >
    You are using the default constructor.
    Just create your own constructors. Create several of them if you want: one that takes a T1 instance. Then you can provide that T1 instance statically or from a query and the constructor will access the values without you needing to specify them.
    You could also create your own constructor so that if you only provide one value the constructor calls 'super' and creates some 'default' T1.x value.

Maybe you are looking for