Re: Help! how to get the content of each cell in a CellSet?

From: peter_zhang (zhangp_at_protect.com)
Date: 09/24/04

  • Next message: Michael Rys [MSFT]: "Re: Help, Transferring XML data under SSL"
    Date: Fri, 24 Sep 2004 19:00:47 -0400
    
    

    you need to loop through the cellset, using an indexer to get the content.
    look throught the following c# code

                            int[] cellIndex = new int[cells.Axes.Count];
                            for (int i = 0; i < cells.Axes[1].Positions.Count; i++)
                            {
                                    cellIndex.SetValue(i, 1);
                                    DataRow r = tbl.NewRow();
                                    r[0] = cells.Axes[1].Positions[i].Members[0].Caption;
                                    for (int j = 0; j < cells.Axes[0].Positions.Count; j++)
                                    {
                                            cellIndex.SetValue(j,0);
                                            // first axis. create a datarow, add the id column for the datarow,
    finally add row to table
                                            r[j+1] = cells.Cells[cellIndex].Value;
                                    }
                                    tbl.Rows.Add(r);
                            }


  • Next message: Michael Rys [MSFT]: "Re: Help, Transferring XML data under SSL"

    Relevant Pages

    • Re: Ada tasking question
      ... protected Indexer is ... task type Worker is ... end loop; ...
      (comp.lang.ada)
    • Re: Looking for lots of words in lots of files
      ... Seriously tho, aside from using a real indexer, I would build a set of the words I'm looking for, and then loop over each file, looping over the words and doing quick checks for containment in the set. ... I don't think that would be a complicated solution and it shouldn't be terrible at performance. ...
      (comp.lang.python)
    • Re: If Statement to fill in column to last row
      ... The variable X serves as a counter, or maybe "indexer" is a better word, a loop. ... The X=2 establishes a starting value for the indexer and the value in the lastRow variable sets the ending value for it. ... > Dim lastRow As Long ...
      (microsoft.public.excel.programming)
    • Re: efficency question
      ... or Go throught it with a while or for loop? ... to believe that one piece of code is acting as a bottleneck. ... If replying to the group, please do not mail me too ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: 50 Buttons!
      ... > If your buttons name's follow a pattern, you can use an indexer and loop ... Or, much better IMO, would be to have an array of buttons: ...
      (microsoft.public.dotnet.general)