To loop through a collection arrayCollection

I need to:

1 loop through a collection of table,

2. Select a specific string in this collection

3 extract a url this string

4. Insert an additional string to the table with that extracted url

The code I use to date is:

" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"minWidth ="1024"minHeight ="768"> "
< mx:Script >
<! [CDATA]
Import mx.collections.ArrayCollection;
Import mx.rpc.events.ResultEvent;

[Bindable]
private var resultArrayCollection:ArrayCollection;

private void doSearch (e:MouseEvent): void
{
twitterSearch.url = " " http://search.Twitter.com/search.atom?q=LDN ";
twitterSearch.send ();
}

private function onResult (e:ResultEvent): void
{
resultArrayCollection = e.result.feed.entry as ArrayCollection collection;
}

[]] >
< / mx:Script >

< mx:HTTPService id = "twitterSearch.
result = "OnResult (Event)" / > "

.....


the HTTP service pulls in data from Twitter for example search http://search.Twitter.com/search.atom?q=LDN .

Any help would be received with gratitude.

Please remove the quotes-"[count].

for(var count:int = 0; count < resultArrayCollection.length; count++) {
     trace(resultArrayCollection[count].title);
}

Tags: Flex

Similar Questions

  • How to loop through DataGrid (ArrayCollection, DataProvider collection)

    I need to loop through a collection ArrayCollection DataProvider or DataGrid (not sure which is best) so that I can insert information in a database through ColdFusion.

    The data grid has three columns: ID, item and quantity.  I have a table that contains these same fields.  The DataGrid control is pre-filled with a list of items.  The user can then enter the quantity of items in the DataGrid.  I then want to store this information in my table.  In ColdFusion, I would accomplish this through CFLOOP, however, in Flex I want to loop through the data grid so that I can get all the items and the quantities that the user has updated.

    I guess I have to do a loop in ActionScript, but I don't know how to do that.  Can anyone provide a suggestion and example code?

    Thanks again!

    Lee

    If this post answers your question or assistance, please mark it as such.

    Here ya go:



    http://www.Adobe.com/2006/mxml '.
    creationComplete = "init (); » >
     
        Import mx.collections.ArrayCollection;
         
    public void init (): void {}
    var ac:ArrayCollection = new ArrayCollection([)
    {Field1: "my one - item a field", Field2: "my field two - point one"},
    {Field1: "my field one - point two", Field2: "my field two - point two"},
    {Field1: "my one - three field element", Field2: "my field two - point three"},
    ]);
    for each {(var point: Object en ac)}
    for each {(var: objet field àle point)}
    trace (Field);
    }
    }
    }
    ]]>
     

  • Loop through all the items in a collection

    I need to loop through all the elements of a collection in a VB.NET program that uses the InDesign API. For example, I want to loop through all the pasta spread masters in a document. Here is my sample code:

    Dim I As Integer = 0

    Var MyApp as InDesign.Application = Nothing

    Var MyDoc as InDesign.Document = Nothing

    Var MyPage as InDesign.Page = Nothing

    MyApp = CType (Activator.CreateInstance (Type.GetTypeFromProgID ("InDesign.Application"), True), InDesign.Application)

    MyDoc = CType (MyApp.Documents.Add (False), InDesign.Document)

    With MyDoc

    With. DocumentPreferences

    . PageHeight = "8.5I".

    . PageWidth = "5.5i."

    Ends with

    With. ViewPreferences

    . HorizontalMeasurementUnits = InDesign.idMeasurementUnits.idPoints

    . VerticalMeasurementUnits = InDesign.idMeasurementUnits.idPoints

    Ends with

    If. MasterSpreads.Count > 0 Then

    For I = 0 To. MasterSpreads.Count - 1

    Dim ThisMasterSpread As InDesign.MasterSpread = CType (.) MasterSpreads.Item (I), InDesign.MasterSpread)

    Next I

    End If

    Ends with

    When it runs, I get an error on the last Dim statement which defines ThisMasterSpread. It highlights. MasterSpreads.Item (I) and gives the following error:

    COMException was unhandled: the Member required to the collection does not exist.

    How I managed to loop over all the pasta spread masters?

    Thank you!

    A lot of trial and error, I discovered the answer to my own question: the Collections are 1-based, not 0-based. My statement

    For I = 0 To. MasterSpreads.Count - 1

    should be

    For I = 1 To. MasterSpreads.Count

  • How to build a collection ArrayCollection with distinct values of an XMLListCollection?

    Hello, I'm really bad with what seems like it should be a very simple task. I have a XML of course object which consists of only the names of course. I just want to create a new collection of ArrayCollection which consists of only the names of DISTINCT/UNIQUE course in the XML list to use in a combobox control. I tried all sorts of things but nothing I try seems to work. I have a few listed below MXML.

    Any help would be appreciated! Should be simple im sure, and once I understood that, it will make my app built much easier! The value of myDistinctData is the final ArrayCollection collection. For simplicity, I left my attempts failed the loop foreach. THANKS TO ANYONE WHO CAN OFFER HELP!

    MXML CODE:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "horizontal" initialize = "GB (); ">

    < mx:Script >

    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    public var myDataDistinct:ArrayCollection

    public void go (): void {}

    var myData:XML =

    < course >
    < course cid = "1" >
    < name > course 1 < / name >
    < / course >
    < course cid = "2" >
    < name > course 1 < / name >
    < / course >
    < course cid = "3" >
    < name > course 2 < / name >
    < / course >
    < course cid = "4" >
    < name > course 3 < / name >
    < / course >
    < course cid = "5" >
    < name > course 1 < / name >
    < / course >
    < course cid = "6" >
    < name > course 3 < / name >
    < / course >
    < / course >;

    for each {(thisCourse:XML var in myData)

    -SOME CODE THAT CREATES A TABLE OF DISTINCT VALUES GOING HERE?
    }
    }
    []] >

    < / mx:Script >

    < mx:Label text = "names of separate courses:" / > ""
    < mx:ComboBox dataProvider = labelField "{myDataDistinct}" = "" / >

    < / mx:Application >


    I don't know how to remove duplicates in an ArrayCollection collection or otherwise.
    But since you already have an XML and require only a text node inside.
    I go through the easiest way.

    Please take a look


    http://www.Adobe.com/2006/mxml"layout ="horizontal"initialize ="GB (); » >

    Import mx.collections.ArrayCollection;

    [Bindable]
    public var myDataDistinct:ArrayCollection

    public void go (): void {}

    var myData:XML =

    Course 1


    Course 1


    Course 2


    Course 3


    Course 1


    Course 3

    ;

    you need to do collection here ArrayCollection instance before put something u.
    this.myDataDistinct = new ArrayCollection();

    E4X selection
    var xmlList:XMLList = myData.course.name;

    for each (var xml in xmlList)
    {
    trace (XML); you will see that we have now.
    var str:String = new String (xml);
    var flag: Boolean = true;
    for (var i: Number = 0; i
    {
    If (this.myDataDistinct.getItemAt (i) == STR)
    {
    flag = false;
    break;
    }
    }
    if(flag==true) {This.myDataDistinct.AddItem (STR) ;}
    }
    }
    ]]>



  • Change the values in a collection ArrayCollection

    I have an ArrayCollection collection and I want to change the x property where property y = wotnot

    What is the syntax for this?

    Thank you
    Mike

    No, it's actually an arrayCollection of objects collection so I guess I have to loop through the array to find the object I want to...

  • loops through the sections XML &lt; RecieptDetails &gt; and for each record found...

    My input XML file is...
    I get this XML using file adapter...

    <? XML version = "1.0" encoding = "UTF-8"? >
    -< root xmlns:ns2 = "http://www.w3.org/2001/XMLSchema" >
    -< ns2:ReceiptBatch >
    < ns2:FileID > "99999" < / ns2:FileID >
    < ns2:Warehouse > in THE < / ns2:Warehouse >
    'L' < ns2:Revision > < / ns2:Revision >
    < ns2:DocID > A4 < / ns2:DocID >
    -< ns2:Receipt >
    < ns2:DeliveryNo > 123 - OP < / ns2:DeliveryNo >
    < ns2:ProcessDate > 112138 < / ns2:ProcessDate >
    < ns2:ContainerNo > 98765 < / ns2:ContainerNo >
    < ns2:Instructions > TREKAU < / ns2:Instructions >
    < ns2:ReceiptType > 1 < / ns2:ReceiptType >
    < ns2:SuppCustCode > 111 < / ns2:SuppCustCode >
    TREK-Cycle < ns2:SuppCustName > < / ns2:SuppCustName >
    -< ns2:ReceiptDetails >
    < ns2:Line > 1 < / ns2:Line >
    < ns2:ProductCode > 1000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 1 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 1 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    -< ns2:ReceiptDetails >
    < ns2:Line > 2 < / ns2:Line >
    < ns2:ProductCode > 2000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 2 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 2 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    -< ns2:ReceiptDetails >
    < ns2:Line > 3 < / ns2:Line >
    < ns2:ProductCode > 2000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 3 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 3 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    < / ns2:Receipt >
    < / ns2:ReceiptBatch >
    < / root >

    There are 2 tables in the database.
    Table 1 = T1743512
    Table 2 = T2743002

    table - structure

    T1743512-

    DOCO KCOO DTCO LNID LNIX LITM NOTICE USR JOBN UPMJ PID'M CKNU UREC
    123 00026 1 1 1000 1 1 123 - OP OP
    124 00026 1 1 1000 1 1 124 - OP OP
    123 00026 2 2 1000 2 2 123 - OP OP
    123 00026 3 3 1000 3 2 123 - OP OP



    Things to do are:--

    1. Research Notice T1743512 (table) with the following keys:
    1.T1743512. CKNU = < DeliveryNo > XML
    2.T1743512. LNIX = XML < row >
    II. write a record in the T2743002 table for each < RecieptDetails >. (See map below)

    Mapping of the records in the table T2743002 to < ReceiptDetails >

    EDU - "SABSSV".
    EDBT - < EDBT > (the same for all records)
    EDTN - < DeliveryNo > (from the section < reception > XML)
    EDLN - < row > (from < ReceiptDetails > section in XML format)
    EDSP - white
    DOCO - white
    DCTO - white
    KCOO - white
    LNID - white
    LITM - < ProductCode > < ReceiptDetails > section
    UORG - < QuantityAdvised > < ReceiptDetails > section
    UREC - < QuantityReceived > < ReceiptDetails > section
    USER - "SABSSV".
    JOBN - "SOA - 3PL".
    PID - 'PO-ENTRANTS ".
    UPMJ - current Date Julian
    - Hour current HHMMSS



    Please suggest the solution.

    Published by: Prashant_AP on June 22, 2012 12:24 AM

    Hello

    Solution by using a loop in BPEL;
    1 count the number of nodes for ReceiptDetails.
    2 create a counter for loop through each node ReceiptDetails. Use a while loop in BPEL
    3 search T1743512 (table) with DeliveryNo and the line. Make sure that you select the correct line from the ReceiptDetails node element node. This can be done using the counter example of xpatch ns2:ReceiptBatch / ns2:Receipt / ns2:ReceiptDetails [counter] / ns2:Line. Please use the DB adapter.
    I guess that the DeliveryNo can only appear once in the document following your example.
    4. for each receiptDetails you write a record in table too T2743002. Please use the DB adapter.
    5. Since the time increment the counter. This is to ensure that the while loop stops at the point where the counter is greater then the number of nodes to ReceiptDetails.

    I think a better solution is to make the loop in PL/SQL. It will be faster. You specify an input of type of collection in your pl/sql package parameter. Assign all items receiptDetails and DeliverNo line to the PL/SQL package. Within PL/SQL unravel you the closure. With a little luck, you have the T2743002 in the same schema to create the record too. Otherwise create synonyms of the database or database links.

    Good luck

    Thank you

    Sander

  • changing the collection arrayCollection changes other arrayCollections

    Hello

    I need to create a collection arrayCollection as a copy of another collection arrayCollection. Then I need to change some data within the copy, but when I do that collection as well original arrayCollection changes. Is there a way to prevent changes in the original arrayCollection collection?

    For example, I got: .someVar arrColOrig [0] = 1

    I tried:

    arrColCopy = new arrayCollection (arrColOrig.source) collection

    arrColCopy [0] .someVar = 2

    effect is that .someVar arrColOrig [0] = 2

    I also tried:

    ARR = new Array

    ARR = arrColOrig.source

    arrColCopy = new arrayCollecion (arr);

    arrColCopy [0] .someVar = 2

    effect is that 'someVar' changes to the value '2' in arr and arrColCopy and arrColOrig

    So is it possible to retain the original unchanged arrayCollection collection? I know that I can create the copy by a loop of the original arrayCollection collection, but I'm looking for an easier way.

    Hello

    It's what happens when you do things from the top of your head, I forgot the important bit...

    Arr2 = ObjectUtil.copy (arr1) as ArrayCollection collection;

    David

  • Enter the filtered items in collection ArrayCollection after such FilterFunction

    It is an easy one. I have my filtering function, but rather than use main ArrayCollection collection after it has been filtered, I want to retrieve all filtered items and pass them in another collection ArrayCollection.

    private var allScreens:ArrayCollection;

    [Bindable]
    private var filteredScreens:ArrayCollection;

    private void filterFunc(value:Object):Object
    {
    If (Number (value.module_number) == 1)

    {
    Returns true;
    }
    Returns false;
    }


    private void filterSuff(value:Object=null):void
    {
    allScreens.filterFunction = filterFunc;
    allScreens.refresh ();

    for (var i: int = 0; i < allScreens.length; i ++)
    {
    If (allScreens.getItemAt (i) .module_number == 1) {}
    filteredScreens.addItem (allScreens.getItemAt (i) .filename);
    }
    }

    trace (ObjectUtil.toString (filteredScreens));
    }

    Hmm, addAll() is a function for the ArrayCollection with Flex SDK 3.3 collection, but I guess not in some versions.  A loop could perform the same function.

    var point: Object;

    for each (item in the original)

    {

    filtered.addItem (item);

    }

    Let me know if it does the trick.

    Ben Edwards

  • Help!  How to upgrade two dimension collection ArrayCollection?

    Hello

    I'm having a problem of understanding of documentation on populating a DataGrid of two dimension collection ArrayCollection. My situation is that I have a DataGrid with a bunch of information, currently stored in a two-dimensional array (digital in the first dimension and by field name in the second dimension). I also have a bunch of data streaming from an XMLSocket, which, when it happens, is analyzed, resulting in one of the fields of the table in need of update. I can do very well with the table directly, but I can't try to understand how use the ArrayCollection collection features to cross this two-dimensional structure - setItemAt() does not seem suited for this purpose? I need to trigger the effects on the relevant cell that has been updated, when I round coding, so I will try to use some structure that handles update events and others for me automatically, such as the ArrayCollection collection.

    I do not know is still the best technique to use, and the intermediate level (the ArrayCollection collection and others) could be changed completely, so if you can suggest (and illustrate, if she is as confused as this!) a better method, I would be grateful.

    Thank you

    David

    Ah.

    You must look for the item in the collection ArrayCollection. This is usually done with a loop in the collection. When you have found the item you would:

    Item.Quantity = new quantity;
    dp.itemUpdated (item);

    You must call the method of collection itemUpdated to make the signal Collection all interested parties (for example, the DataGrid bound to her) she's changed.

    A Collection can also views and ViewCursors that might be useful to have a lot of data.

  • Filter collection arrayCollection based on elements in another table?

    I have a table that contains several values: ["361 364"] = array1

    Here's the id references that change frequently.

    I have an arrayCollection collection that contains a bunch of files. I have experience of writing code to perform simple filtering of my collection arrayCollection using the filterFunction function and a simple piece of criteria.

    I am trying to reach a loop for filtering my arrayCollection collection to look at the number of element in array array1 and then filter my arrayCollection collection, leaving only entries that match the id numbers in array1.

    I am using a ".. for each" loop but I do not understand the result I need...

    Sample:

    public var matchingID:int:

    private function filterArray (): void
    {
    for each (var i: int array1)
    {
    matchingID = i;
    arrayCollection.filterFunction = checkIDs;
    }
    arrayCollection.refresh ();
    }

    private void checkIDs(item:Object):Boolean
    {
    If (item.id is matchingID)
    {
    Returns true;
    }
    on the other
    {
    Returns false;
    }
    }


    When I run this code I find myself alone with a collection consisting of single entry, arrayCollection which is the last. My brain is frozen trying to understand this one. The values and the amount of values will vary in array1 I am looking for a loop of filtering for arrayCollection collection that works no matter how many values of array1 is.

    Any creative ideas?

    You wanted to probably say array1 = [361, 364], right?

    Try this.

    TS

  • loop through XML

    I have the below XML and i want to loop through this XML and put the value in an array
    
    <Subproductdetails>
      <Subproduct id="1" name="AA" /> 
      <Subproduct id="2" name="BB" /> 
    </Subproductdetails>
    say, I declare a number table num_arr, I want the num_arr to be filled with id: 1 and 2.
    is someone can please show me how this is done in pl/sql

    Thank you.

    Hello

    If you have 10.2 or higher, try this:

    DECLARE
    
     TYPE num_arr_type IS TABLE OF NUMBER;
     num_arr num_arr_type;
    
     v_xml xmltype := xmltype('
      
      
    
    ');
    
    BEGIN
    
     SELECT id
     BULK COLLECT INTO num_arr
     FROM XMLTable(
      '/Subproductdetails/Subproduct'
      passing v_xml
      columns id number path '@id'
     );
    
    END;
    /
    

    For versions prior to 10.2 (and with the support of xmltype), use the following SELECT statement instead:

    SELECT extractvalue(column_value, 'Subproduct/@id')
    BULK COLLECT INTO num_arr
    FROM Table(
      XMLSequence(
        Extract(v_xml, '/Subproductdetails/Subproduct')
      )
    );
    
  • Collection ArrayCollection clone

    [Salvation all THE]

    I decided to create a new topic for a problem in another... never mind: P

    Simple question

    I had a myOriginal (collection ArrayCollection), clone/where you want it and call the new: myCloned (collection ArrayCollection).

    myOriginal cannot be updated any more.

    This is my code so far but it stills updated the original Collection. I prove that by the loop and the trace of the original Collection.


    [Bindable] private var myData:ArrayCollection;
    [Bindable] private var myCloned:ArrayCollection;

    private void resultHandler(event:ResultEvent):void {}
    myData = event.result.db.data; Original data
    cloneOriginal(); Perform cloning
    myData.disableAutoUpdate (); It is wrong... in the 'core' still updates... I think so..
    }


    private function cloneOriginal (): void {}
    var myCloned:ArrayCollection = new ArrayCollection();
    for (var c:int = 0; c < myData.length; c ++) {}
    myCloned.addItem (myData [c]);
    }


    Thanks in advance... ;)
    Base on...

    Thank you for using Clara, after some time, I've done the correction :)

    Final code, thanks to anyone are [[]]:

    "- How do I clone an ArrayCollection collection.

    Import mx.utils.UIDUtil;
    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;

    [Bindable] public var myOriginal:ArrayCollection;
    [Bindable] public var myCloned:ArrayCollection = new ArrayCollection();

    FLEX THINGS...
    public void objectCopier(toAdd:Object):Object {}
    var addME:Object = clone (n);
    addME.mx_internal_uid = UIDUtil.createUID ();
    return Alain;
    }

    public void clone(source:Object): * {}
    var myBA:ByteArray = new ByteArray();
    myBA.writeObject (source);
    myBA.position = 0;
    Return myBA.readObject ();
    }
    END

    public void resultHandler(event:ResultEvent):void {/ / result of a HTTPService...} For example, of course...
    myOriginal = event.result.db.data;
    myCloned = clone (myOriginal); THE ACTION IS HERE

    hList.dataProvider = myOriginal; Stay forever with these data
    hList2.dataProvider = myCloned; Table working on it
    }

  • Problems on collection ArrayCollection and DataGrid

    Hi people!
    I have a problem of ugly...
    in the my application, I have a datagrid named DG and its dataprovider is bound as an ArrayCollection called AC collection.
    A result of the query contains the AC...

    Ok.. So far so good...

    the problem just when I try to select an object in AC by name...
    AC has done like this:
    0 objecthjh324jghf7
    1 objectd5674567
    2 objectAaagohrtt
    3 object4534c45jg

    so I can choose an object by its index (0,1,2,3... ecc)
    but not by name (objectxxxxxx)

    I might want the names of the objects are the name of the column (such as ID, NAME, NATION, phone ecc)

    is this possible?
    now, if I want the object ID in KT (i.e. the ID column in my datagrid DG), I have to check with a loop from 0 to col_number to find some AC (loop_value) USER.USER

    EDIT
    example:
    If my first column of the DG's 'id', I want to use something like "myDataGrid.columns ('id')", now I have to use this "myDataGrid.columns (0)»
    EDIT
    Help me please! : D :D

    PS: Sorry for my bad English... ^ _ ^

    "Amy Blankenship" wrote
    in the message news:[email protected]...
    >
    > "123qweads" wrote in message
    > news:[email protected]...
    > okay...
    > maybe I made a few mistakes in my last posts.
    > I'll try to explain better my problem...
    >>
    > my problem is to give a name to myDG.columns
    > (before I talk about DATAGRID...) Sorry! I'm guilty... but the problem
    > is
    (> the same)
    >>
    > myDG.colums is a TABLE and I can get you an object index for example
    > myDG.colums (1) .dataFiled or myDG.colums (2) .visible ecc...
    > If I can give a name for the elements of each array, I could take an object by
    > its
    > name for example myDG.colums (ID) .dataFiled or myDG.colums (PRICE) .visible
    > ecc...
    >>
    > Today I discovered how give an object name in the ARRAYCOLLECTION collection... in
    > This
    > way
    > var o: Object = new Object();
    > o [namecol1] = myObject1;
    > o [namecol2] = myObject2;
    > myAC.addItem (o);
    >>
    > works very well and myAC I find namecol1, namecol2, namecol3 instead
    (0), (1), (2) but when I convert collection ArrayCollection in table online
    >>
    >>
    >>
    > I lost all the name of the object... and remains only the information from the object (i.e. the)
    > column
    (> information as dataField, visible, headerText, etc.)
    >>
    > WHY DO I WANT TO DO?
    > I want to write a function that hide certain columns...
    > now, my function is O (n * m), where n< m="" but="" if="" i="" can="" resolve="">
    > problem
    > my function become o (n)
    > and it's a good thing
    >>
    >>
    >>
    >>
    > BAD! (now)
    > public void HideColums(col:Array,_myDataGrid:DataGrid):void {}
    > for (var x: int = 0; x)< col.length;="">
    > for (var i: int = 0; i< mydatagrid.columncount;="">
    > If (myDataGrid.columns .dataField ==
    (> col [x]) myDataGrid.columns
    .visible = false;
    >> }
    >>
    >>
    > GOOD (after your explanation)
    > public void HideColums(col:Array,_myDataGrid:DataGrid):void {}
    > for (var x: int = 0; x)< col.length;="">
    > myDataGrid.columns [col [c] m:System.NET.SocketAddress.ToString ()] .visible = false;
    >> }

    try (somewhere in your result handler that takes care of your objects):

    var sampleObj:Object = myQuery [0];
    columnNames = []; should be set on a global scale
    for {(prop: String en sampleObj)}
    columnNames.push (prop);
    }

    now:

    public void hideColumns(columnsToHide:Array,_myDataGrid:DataGrid):void {}
    for (var x = 0; x)< columnstohide.length;="">
    myDataGrid.columns [columnNames.indexOf (columnsToHide [x])] .visible = false;
    }
    }

    Note This is not tested, but it's the first thing I would try

  • Loops through Excel spreadsheets

    Hello

    I tried to loop through spreadsheets and Excel doc by increasing the grip of the worksheet. But unfortunately, that doesn't seem to be possible and I got an error.

       ExcelRpt_SetWorksheetAttribute(rawDataWorkSheetHandle,ER_WS_ATTR_NAME,"Analysis Data");
        __caErrChk(ExcelRpt_SetWorksheetAttribute(rawDataWorkSheetHandle+1,ER_WS_ATTR_NAME,"something"));
    

    Is it somehow possible to do? I do not have a handle for each worksheet in my workbook of haven...

    Thank you!

    Hello

    Like it or not, you need to obtain the handle of the worksheet if you want to access the attributes of worksheet.
    There is a function called ExcelRpt_GetWorksheetFromIndex to do this.

    This function returns the handle of the worksheet if you provide the 1-based index.
    Take care you need to call CA_DiscardObjHandle after you are finished with this worksheet.

    So the two functions above should be inside your loop.

  • To loop through a range of data

    Hi guys

    I have this set of numbers. 54 55 56 58 59 61 64 66. I want to loop through this set of numbers to give an array of result of 54 55 56 0 58 59 0 61 0 0 64 0 66.

    Simply, I'm trying to insert a zero in the interval + 1 white in this series of numbers. I couldn't find out how.

    Please help me thanks

    See you soon

    PX

    Hi pengxin,.

    See the image as an attachment.

    Mike

Maybe you are looking for