as long as i know, and about a few weeks i have to do the same on java
you need to use the cellFeed to add and modify columns
the listfeed dont work becouse you can chage tag names.
the tags are the first row use a query with maximun row =1 to get it.

On Jul 1, 4:32 pm, jacco <jtma...@gmail.com> wrote:
> hello,
>
> i am trying to create a proof of concept method that takes an ADO.NET
> datatable and creates a new (spread)sheet based on the structure of
> that datatable.
>
> ---------------------------------------------------------------------------­-------------------------------------------------------------------
>
>     Private Sub ToGoogleSpreadsheetPOC(ByVal dt As DataTable)
>
>         'Get the spreadsheet service (SpreadsheetsService)
>         service = New Google.GData.Spreadsheets.SpreadsheetsService
> ("MyTestApp")
>         service.setUserCredentials("mygmailacco...@gmail.com",
> "mypassword")
>
>         'Get a list of spreadsheets (SpreadsheetFeed)
>         Dim query As SpreadsheetQuery = New SpreadsheetQuery()
>         Dim MySprShfeed As SpreadsheetFeed = service.Query(query)
>         Dim mySheet As SpreadsheetEntry = Nothing
>
>         'Get a specific Spreadsheet
>         For Each Entry As SpreadsheetEntry In MySprShfeed.Entries
>             If Entry.Title.Text = "MySample" Then
>                 mySheet = Entry
>                 Exit For
>             End If
>         Next
>
>         'Get a worksheet-based feed
>         Dim link As Google.GData.Client.AtomLink = _
>                       mySheet.Links.FindService
> (GDataSpreadsheetsNameTable.WorksheetRel, Nothing)
>
>         Dim myQuery As WorksheetQuery = New WorksheetQuery
> (link.HRef.ToString())
>         Dim MyWsFeed As WorksheetFeed = service.Query(myQuery)
>
>         Dim myCustomWorkSheet As WorksheetEntry = Nothing
>
>         'Add a worksheet
>         Dim MyNewsheet As Google.GData.Spreadsheets.WorksheetEntry =
> New GData.Spreadsheets.WorksheetEntry(1, 3, "MyData")
>         Dim createdWorksheet As WorksheetEntry = DirectCast
> (MyWsFeed.Insert(MyNewsheet), WorksheetEntry)
>
>         Dim listFeedLink As AtomLink =
> createdWorksheet.Links.FindService(GDataSpreadsheetsNameTable.ListRel,
> Nothing)
>
>         Dim MyLquery As ListQuery = New ListQuery
> (listFeedLink.HRef.ToString())
>         Dim Myfeed As ListFeed = service.Query(MyLquery)
>
>         Console.WriteLine("Worksheet has {0} rows:",
> Myfeed.Entries.Count)
>
>         Dim newRow As ListEntry = New ListEntry()
>         Dim curElement As ListEntry.Custom = New ListEntry.Custom
>         curElement.LocalName = "ID" : curElement.Value = 1
>         newRow.Elements.Add(curElement)
>
>         Myfeed.Insert(newRow)
>
>     End Sub
>
> ---------------------------------------------------------------------------­-------------------------------------------------------------------
>
> in the last codeline i keep getting an GDataRequestException.
> "Execution of request 
> failed:http://spreadsheets.google.com/feeds/list/rLmI3TjGHtmiNDqNCUPfFdog/oc...";
>
> i'm not realy sure what i am doing wrong.
>
> can anybody help me?
>
> regards,
> Jacco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to