How to make a table with ActiveX Excel using Excel_RangeSetValue2?

Hello

I want to make a table in Excel. For this, I use two functions: Excel_WorksheetGetRange and Excel_RangeSetValue2.

I write the table on Excel file, but only the first instance of the table is copied.

Here, a part of my program:

char * DataToWrite = {"A", "B", "C", "D"}

cCell Char [10];
VARIANT vCell, data;

ExcelObj_Worksheet hWorksheet;

ExcelObj_Range hRange;

...

CA_VariantSetCString (& vCell, cCell);        cCell = a1: a4
Excel_WorksheetGetRange (hWorksheet, NULL, vCell, CA_DEFAULT_VAL, & hRange);
CA_VariantSetCString (& Data, DataToWrite);
Excel_RangeSetValue2 (hRange, NULL), data;

Here what I get when I'm compiling on Excel file:

A

A

A

A

You must use the other instructions to complete the range of cells:

strcpy (msg, "A1: a4");
CA_VariantSetCString (& MyVariant, msg);
Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyVariant, CA_DEFAULT_VAL, & ExcelRangeHandle);
Excel_RangeActivate (ExcelRangeHandle, NULL, NULL);

Create a SafeArray of data table
CA_VariantSet2DArray (& MyVariant, CAVT_CSTRING, lines, 1 table);
Transfer data to Excel range
Excel_SetProperty (ExcelRangeHandle, NULL, Excel_RangeValue2, CAVT_VARIANT, MyVariant);

ClearObjHandle (ExcelRangeHandle);

Tags: NI Software

Similar Questions

  • How to make a table with all dates between two dates

    Basically, I need a vi that returns an array with elements containing all individual dates between the two dates. I am trying to build one myself... but obviously if there is already a few vi do that I would use it instead. Anyway, any help is appreciated... I'll just be over here write it too hard to pass the time.

    Just an idea

    Output is the table of dates (like timestamps) between the timestamps 'Start' and 'end '.

    Marco

  • How to make a form with report and a form of inclusion in the same page?

    Hey, guys:

    I was wondering if you could have any link or examples to show how to make a form with report and a form of inclusion in the same page, these two forms are related to the same table. Our customer wants that a user can add a new row to the table in a form and see all lines created by this user in a report, the report should provide link change as well. the problem is: whenever I inserted a new line or change a line or delete a line, and submitted and return to this page, all hidden elements lost their values, this report is empty, and some display only items also lost their values. Could someone give me any suggestions?

    Thank you very much!

    Sam

    So, the problem is essentially with page elements lose their session state values when re-loading of the page. How do you define values for the elements of the hidden page? You have default values defined for those? They are based on the database column? What is the "Source" parameter for these items on the page? It is set to "Always, replace any value in session state"? You have any process of 'Empty the Cache', which is reset these values to null element?

    What is your version of the Apex?

    I would recommend that you have installed for example in apex.oracle.com. This would help to better understand the issue.

    Published by: jaouad khalifi on 13 December 2012 22:11

  • 5.6.1 pages: How to create a table with more than 999 lines?

    5.6.1 pages: How to create a table with more than 999 lines?

    The table on Pages v5.6.1 line selector is limited 3-digit, as it is in Pages ' 09 v4.3. Either use LibreOffice Writer, who does not have any constraint line on processing tables 3-digit, or any application spreadsheet for top 3-digit row needs.

  • In Windows Live Movie Maker, how to make a subtitle with the inner different font sizes?

    How to make a subtitle with different font sizes, as in the old Windows Movie Maker?

    I want to produce an effect video, like MTV clips that fade in and out for video (not before or after the video). It of about what I want to produce and could not because the new WLMM seems to have this deleted title feature.

    My song (large)
    Composer (small fonts)

    I want that this block of text fade in and out for my video. Is there a way to do this? Otherwise I would feel obliged to go back to the old WMM.

    FWIW... going back to an older version of Movie Maker
    Maybe the answer. You need to restart your
    because the Live Movie Maker WLMP project project files
    would be not compatible.

    No guarantee but the next for an installable download
    version of Vista Movie Maker 6 may be worth a try

    * Proceed at your own risk *.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Windows Movie Maker Installer for Windows 7
    http://noeld.com/programs.asp?cat=video#wmminst

    Also, Movie Maker 2.6 will work on Windows 7:

    Windows Movie Maker 2.6
    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&id=34
    (this is similar to the version of Win XP Movie Maker 2.1)

  • How to make a paper with some boxes to fill required for me to sign, and then some other boxes needed for the next person to sign. I want the boxes I've filled to be locked the next person.

    How to make a paper with some boxes to fill required for me to sign, and then some other boxes needed for the next person to sign. I want the boxes I've filled to be locked the next person.

    Hi johanb64152807,

    You can use eSign service, where you can send the document for signatures of several signatories, but the document will be sent to the following signatory after the earlier signed & it is not possible for him to make the changes.

    Documents KB for help: -.

    Kind regards
    Nicos

  • How to create the table with value list/map binding

    I need to display some values in a tabular format. It is possible to create a table adf without having value binds to a VO object. I can make a table with a combination of list/map.

    I want to change the format of display with minimum change in the application. I therefore seeks a change to a list/map and map with the table.

    Here is the structure in that I need to post.

    _______________________
    |     | Header1. Tete2 |
    |_______|_______|_______|
    | Txt R1 | value 1. Value 2.
    |_______|_______|_______|
    | Txt R2 | Value 3. value 4.
    |_______|_______|_______|

    All views is completely irrelevant. So I should not create a VO and add the VO object lines.

    Published by: yannick June 10, 2011 11:34

    Yes, you can do it. Create a pojo with properties (column) that you want to display in the table and create a list of instances of the POJO and then you can fill your table using the list.

    Sample:

    //POJO
    public class SamplePojo {
    
    private String col1;
    private String col2;
    
    public SamplePojo(String col1, String col2){
      this.col1 = col1;
      this.col2 = col2;
    }
    
    //add setter and getter methods
    }
    
    //Inside bean, prepare a list with pojo instances (Assume a getter exists for pojoList)
    pojoList = new ArrayList();
    pojoList .add(new SamplePojo("Value1", "Value2");
    pojoList .add(new SamplePojo("Value3", "Value4");
    etc.
    
    //Inside jspx
    
       
         
       
       
         
       
    
    

    HTH
    Jean Lou

  • How to create a table with two unique columns

    How to create a table with two unique columns. I use the following syntax below and I get the error message such unique or primary key already exists.

    create the table COPQ_WORKCELL_GOAL
    (
    Type_id varchar2 (4) NOT NULL UNIQUE,
    Tyle_Location varchar2 (30) NOT NULL UNIQUE,
    Type_Description varchar2 (20).
    KEY elementary SCHOOL (Type_id)
    );

    Use 1 or the other column type_id;

    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4),
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20),
      PRIMARY KEY (Type_id)
    );
    
    Table created
    drop table COPQ_WORKCELL_GOAL;
    
    Table dropped
    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4) primary key,
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20)
    );
    
    Table created
    
  • How to make a request on a URL using webworks development environment?

    Hey geeks,


    How to make a request on a URL using webworks development environment?


    Thanks in advance...!

    "A request for a url" you try to perform an ajax call and it does not work? Any field/origin you're wanting access must be white listed in a element in the config.xml file. Details of this are in the WebWorks development guide

  • How to make a shadow with a picture of table top

    I have to photograph jewelry and must make a shadow with the objects that I shoot. They are a ring and a bracelet.

    Can you offer and the 'easy' way to do this please.  Thank you very much, Penni

    The simplest is to photograph the jewelry with a directional light that will cast a shadow. Photographing jewelry on a white background.

    Then this in Photoshop.
    (1) duplicate the image layer.

    (2) mask the jewels on the top layer.

    (3) Desaturate the layer below.

    (4) levels of use on the layer shadow to add contrast, making all white white background without blowing in the shade.

    Is attached a screenshot of a product shot with shadow created as described above.

  • How to make the table from separate text semikolon

    Hello

    I have a text with multiple lines. The lines are separated with \r\n.

    In every row is the same number of values that are separated by a semikolons.

    How can I (easy) make the tables of each value online?

    Currently, I solved it by creating a loop and using game-model, register shift, to insert to the table... But this looks very great.

    How can I make this easier?

    Thanks for the help

    Hello

    We must define the separator.

    See the image as an attachment.

    Mike

  • Does anyone know how to make this box with the price?

    Hello!!

    I do my "wedding site" I am unware of what the "real generals" how call these element.

    I wanted to know if anyone knows if it is possible to make these boxes of price with the amount of padding box below?

    Can you do something like this in MUSE (it seems quite possible) can someone give me a hand or a tutorial on how to do it.

    I thought using some kind of widget or compositions. Thank you very much! Here is the real site to see it in action. His 'Gifts' section http://celebr8with.us/

    Thank you in advance!

    Screen Shot 2014-03-11 at 6.15.53 PM.png

    Hello

    The downs with attributes price drop would require a custom coding on your end, but if you have a plan, then you can use product information at end of sale with the price set by the product itself.

    Something like this:

    http://Muse.Adobe.com/exchange-library/pricing-table

    Thank you

    Sanjit

  • How to create the table with the rows and columns using the layout?

    One of my friends advised me to put my site on the mode of provision as it is better than the standard as he said
    but I couldnot make an ordinary table with the rows and columns in mode available th
    y at - there someone who can tell me how to?
    Thank you very much

    Wednesday, April 18, 2007 21:01:38 + 0000 (UTC), "Mr.Ghost".
    wrote:

    > A friend of mine advised me to put my whole site on the mode of disposal as its
    > better than standard, as he says

    Your friend won't. Don't listen to him any more. Mode of disposal creates
    very fragile and rigid code pauses at the first opportunity.

    Gary

  • How to make a ringtone with Itunes 12.4.2.4?

    I'm new with Iphone... I now have a 5 s.

    I have itunes 12.4.2.4

    How can I make a ringtone with a real song?

    Thank you

    go to AppleSupport

  • How to make a macro with a goal photos 50 mm f1.8 Prime

    How to make a photos of macro with a prime lens 50 mm f1.8 lens is labeled macro, but only makes farm ups.

    A "true" macro lens allows to approach quite close to your subject that the size of the image on your sensor is larger than what is in real life.

    For example: your sensor is "roughly" 14 x 21 mm.  A penny in the United States has a diameter of 19mm.  This means with a real purpose of macro scale '1:1 ', you could get close enough to the penny the edges of upper and lower of the penny does not fit in the frame (the will of sides... barely.)

    There are a number of ways of "close-up" photography.

    (1) buy a "real" macro lens  The EF-S 60mm f/2.8 Macro USM lens is fantastic and also good enough prices.  A 'real' macro lens will provide the highest quality of image.

    (2) buy "extension tubes".  These committed between the casing and the lens, but they are hollow (there is no element of glass in them but they have electronic contacts so that the lens and the body can still communicate.)  By moving the furthest lens to the focal plane, the range of the lens is considerably reduced.  This allows you to get much closer that otherwise would be possibe.

    (3) use diopters "close up".  Here's the screw on filters that you screw on the end of your lens.  They provide a larger/more close to your subject.  The disadvantage of these, it is that they can show distortion near the edges of the image.

    (4) use a ring of "Recoil".  It is a ring that allows you to mount your lens on the camera body... back.  The screws on the front of the lens (where you would normally be screw on filters), but a bayonet mount on the other side, so you can connect it to the camera.  Using the lens 'backwards', you can get much clsoer.  The downside is that you can't control the lens.  Development is manual and you cannot change the opening.

Maybe you are looking for