Hi Michael, Let me check if I'm reading you correctly, you were able to get the link
http://spreadsheets.google.com/feeds/worksheets/p4Y8CnpFBY_LI-rcFgFM-XA/private/full from the DocumentEntry, but this link did not work for you? What was the problem when trying to access it? In terms of the discrepancy between the two links, the only real difference is the key (p4Y8CnpFBY_LI-rcFgFM-XA vs o17465875873549946849.6646841909362293448). However, these should be equivalent. The reason why sometimes the key shows up in one format and sometimes it shows up in another is historical and not really important. I agree that the Documents List API is a special case in that it spans multiple Google products, unlike the majority of the APIs. I also agree that it would be ideal if the Spreadsheets API accepted an authentication token granted for the Documents List API. This would best be handled by having AuthSub tokens be granted for multiple scopes as per this feature request: http://code.google.com/p/gdata-issues/issues/detail?id=211 However, since it also seems reasonable to further couple the Spreadsheets and Documents List API, I opened a separate feature request to have Spreadsheets allow DocList tokens: http://code.google.com/p/gdata-issues/issues/detail?id=348 Cheers, -Jeff On Feb 8, 11:37 am, michael kariv <[EMAIL PROTECTED]> wrote: > Jeff, > > You got the problem right. Your tip did not work. Let me explain what > I do. > I have a page "Gantt.aspx" that presents (graphically) the data that > it reads from a specially formatted spreadsheet (worksheet). > When I get to that page from the list of all spreadsheets retrieved > using Spreadsheet service query, > it works fine. > When I try and upload a csv file using DocLilst service and then try > to extract the worksheets feed from the returned docEntry (see below) > I fail. > String path2 = Request.MapPath(path); > DocumentEntry docEntry = service.UploadDocument(path2, > projectName); > > Here are the two urls, in comparison. > working, from spreadsheets query > "http://spreadsheets.google.com/feeds/worksheets/ > o17465875873549946849.6646841909362293448/private/full" > non working from > string sheeturl = docEntry.Links.FindService("http:// > schemas.google.com/spreadsheets/2006#worksheetsfeed", "application/atom > +xml").AbsoluteUri; > Session["sheet"] = sheeturl; > > "http://spreadsheets.google.com/feeds/worksheets/p4Y8CnpFBY_LI-rcFgFM- > XA/private/full > > I stopped in the debugger and took a look at all the docEntry.Links > and none matched the pattern above that worked. > > I worked around by adding a timestamp to the uploaded spreadsheet name > making it unique, and add the title to the spreadsheet service query > to find that sheet. > It is stupid, both conceptually and performance wise. > > My weakness is that I tried not to invest time in understanding the > bottom layers of feed API. I was using examples and rough idea of what > goes on. > I still can not afford the learning curve, but examples of me not > understanding the mechanics hitting me hard, so the day is nearing > when I'll take a long and hard look at the xml structure of the feeds, > and the logic of their relations. > > I would be happy if you could recommend me a good article explaining > this. > > Regarding Google Docs Data APIs group, I didn't find answers there, > but if you think that is the place, i'll copy responses there. just > say so. > Here is my original question > there.http://0-groups.google.com.millennium.unicatt.it/group/Google-Docs-Da... > > On a more general note, I understand the need to separate services, > but Doc List stands out. It is inconvenient not being able to upload a > spreadsheet from within the spreadsheet services. I am not sure what > is the best of suggestions in the groups, but the problem is real and > IMHO needs addressing. I try to remove any tiny obstacle in the user > flow and two AuthSubs is a tough thing to explain to user. > > Sorry for mixing subjects. > > Michael > > On Feb 8, 4:42 am, "Jeff Fisher (Google)" <[EMAIL PROTECTED]> > wrote: > > > Hi Michael, > > > Actually, the Docs Data API group would be the best place to ask. Did > > you have trouble getting an answer there? > > > So I can better understand your problem, you are uploading a > > spreadsheet via the Document List API. Then, from the DocumentEntry > > object you get back from doing the upload, you want to be able to > > access the worksheets feed of the spreadsheet you just uploaded. Is > > this correct? > > > There should be a worksheets feed link that you can retrieve from the > > entry. For example, if "entry" is a variable containing a > > DocumentEntry, and it is a spreadsheet, you can print out the > > worksheets feed URL with the following code: > > > Console.WriteLine(entry.Links.FindService("http://schemas.google.com/ > > spreadsheets/2006#worksheetsfeed", "application/atom > > +xml").AbsoluteUri); > > > Hope that helps! > > > Cheers, > > -Jeff > > > On Feb 7, 10:57 pm, michael kariv <[EMAIL PROTECTED]> wrote: > > > > I have asked this question in Google Docs Data APIs group, but it was > > > probably a wrong place. > > > > So here is the question that spans two services - DocList and > > > Spreadsheets. > > > > I have two parts working - I can upload a spreadsheet using DocList > > > and I can edit a spreadsheet given url > > > such > > > ashttp://spreadsheets.google.com/feeds/worksheets/o17465875873549946849... > > > > Now I need to do it in one go. > > > I use .NET client library > > > The problem is that no Url property of DocumentEntry class is that > > > spreadsheets url > > > FeedUri was null, AlternateUri and EditUri had values but not hte one > > > i needed. > > > Any idea ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
