Thanks Vic,

I actually am doing something different with my business logic. But this 
information is good to know, I was hoping it would be a little simpler, 
like a convertListFeedToCellFeed method.

On Friday, March 23, 2012 2:42:49 PM UTC-4, Vic Fryzel wrote:
>
> Wow, I hadn't expected you to give me such a perfect example of difficulty 
> with the Spreadsheets API :D
>
> It's difficult because there is no concept of "create" on a cell, so there 
> is no insert mode for the cells feed in batch mode.  Cells always exist if 
> the worksheet is big enough, and thus already have a value (even though the 
> value is empty).
>
> Essentially, what you'd have to do is this:
>
>    1. Grab all the rows you want from the lists feed
>    2. Iterate over each row, and assign each cell a position
>    3. Grab all the same cells from the cells feed 
>    4. Iterate over each cell, look up its value by position in your other 
>    data structure with the lists feed data
>    5. Take that value, and set it to the value of the current cell
>    6. Issue the batch update request to the cells feed 
>
> -Vic
>
>
>
> On Fri, Mar 23, 2012 at 2:36 PM, David Hodge <
> [email protected]> wrote:
>
>> Vic,
>>
>> Thanks.  The first answer makes sense.  The second question is more 
>> complicated, I think.  
>>
>> So, I wanted to sort a spreadsheet, which as far as I can tell, you would 
>> be dealing with the ListFeed.  Once sorted, I wanted to write batch rows to 
>> another spreadsheet using Cell Based method since you cannot do a batch 
>> insert with List based objects.
>>
>>
>> Regards,
>>
>>
>> On Friday, March 23, 2012 2:22:14 PM UTC-4, Vic Fryzel wrote:
>>>
>>> On Thu, Mar 22, 2012 at 3:23 PM, David Hodge <
>>> [email protected]​> wrote:
>>>
>>>> I want to get x number of worksheets in different spreadsheets, combine 
>>>> the entries and sort on a certain column and loop thru each cell and 
>>>> perform some logic.  What is the best way to do this?
>>>>
>>>> I want to know if it is possible to:
>>>>
>>>> 1) Combine ListEntries from multiple worksheets in memory
>>>>
>>> This should be pretty straight forward.  Just grab append the entries 
>>> from each feed result into a single collection.  Almost everything you need 
>>> is here:
>>>
>>> https://developers.google.com/​google-apps/spreadsheets/#​retrieving_a_list-based_feed<https://developers.google.com/google-apps/spreadsheets/#retrieving_a_list-based_feed>
>>>  
>>>
>>>> 2) Convert a ListFeed to a CellFeed
>>>>
>>> Can you explain why you want to do this?  I suspect there is an easier 
>>> way to achieve your ultimate goal.
>>>  
>>>
>>>>
>>>> Regards,
>>>>
>>>> Dave
>>>>
>>>>
>>>
>

Reply via email to