有人可以告诉我我的 vb.net 代码有什么问题吗?
Dim service As New SpreadsheetsService("MySpreadsheetIntegration-v1")
' TODO: Authorize the service object for a specific user (see other sections)
service.setUserCredentials("xxx@gmail.com", "1234")
' Instantiate a SpreadsheetQuery object to retrieve spreadsheets.
' Instantiate a SpreadsheetQuery object to retrieve spreadsheets.
Dim query As New SpreadsheetQuery()
' Make a request to the API and get all spreadsheets.
Dim feed As SpreadsheetFeed = service.Query(query)
' TODO: There were no spreadsheets, act accordingly.
If feed.Entries.Count = 0 Then
End If
' TODO: Choose a spreadsheet more intelligently based on your
' app's needs.
Dim spreadsheet As SpreadsheetEntry = DirectCast(feed.Entries(0), SpreadsheetEntry)
Console.WriteLine(spreadsheet.Title.Text)
' Get the first worksheet of the first spreadsheet.
' TODO: Choose a worksheet more intelligently based on your
' app's needs.
Dim wsFeed As WorksheetFeed = spreadsheet.Worksheets
Dim worksheet As WorksheetEntry = DirectCast(wsFeed.Entries(0), WorksheetEntry)
' Define the URL to request the list feed of the worksheet.
Dim listFeedLink As AtomLink = worksheet.Links.FindService(GDataSpreadsheetsNameTable.ListRel, Nothing)
' Fetch the list feed of the worksheet.
Dim listQuery As New ListQuery(listFeedLink.HRef.ToString())
Dim listFeed As ListFeed = service.Query(listQuery)
' Create a local representation of the new row.
Dim row As New ListEntry()
row.Elements.Add(New ListEntry.Custom() With { _
Key .LocalName = "ldVorname", _
Key .Value = "Joe" _
})
' Send the new row to the API for insertion.
service.Insert(listFeed, row)