Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:29:58+00:00 2026-06-13T14:29:58+00:00

How to add a simple header row on a programmaticaly created worksheet via Google

  • 0

How to add a simple header row on a programmaticaly created worksheet via Google Spreadsheet API? Its very difficult to understand their doc which has only mentioned how to add a row on already created header row. If a cell based feed is used for the first time for adding a header row,

// Fetch the cell feed of the worksheet.
  CellQuery cellQuery = new CellQuery(worksheet.CellFeedLink);
  CellFeed cellFeed = service.Query(cellQuery);

  // Iterate through each cell, updating its value if necessary.
  foreach (CellEntry cell in cellFeed.Entries)
  {
    if (cell.Title.Text == "A1")
    {
      cell.InputValue = "name";
      cell.Update();
    }
    else if (cell.Title.Text == "B1")
    {
      cell.InputValue = "age";
      cell.Update();
    }
  }

This code doesn’t work as cellFeed.Entries is 0, thus control doesn’t ever enter the for loop.
I have already added a worksheet with (4) rows and (10) columns. But how do I enter a simple header row (as a column) first and then other rows (as values in these columns)?
I know already few questions has been asked but non of them have answers, it is so frustrating and difficult to understand what is this API so complicated to implement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:30:00+00:00Added an answer on June 13, 2026 at 2:30 pm

    the answer is :

            CellQuery cellQuery = new CellQuery(worksheet.CellFeedLink);
            CellFeed cellFeed = _SpService.Query(cellQuery);
    
            CellEntry cellEntry = new CellEntry(1, 1, "name");
            cellFeed.Insert(cellEntry);
            cellEntry = new CellEntry(1, 2, "age");
            cellFeed.Insert(cellEntry);
            cellEntry = new CellEntry(1, 3, "address");
            cellFeed.Insert(cellEntry);
    

    Then the rows can be added below as per the doc matching the above header rows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write header file. I can write simple headers like add(int
I have created blank C#/XAML Windows 8 application. Add simple XAML code: <Page x:Class=Blank.MainPage
I want to add a header row grouping the column headers. Departure Arrival <--
I am simply trying to add a separator line under my header row in
I'm trying to add simple login page to ASP.NET MVC app. I actually use
I am attempting to add a simple toolstrip however I can't get it to
I am trying to add a simple log in with Facebook button to my
I am trying to add a simple form to allow my users to edit
I'm trying to add some simple peer-to-peer connection functionality to an iOS library. Coding
In my application I want to add a simple animation to buttons and other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.