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

  • Home
  • SEARCH
  • 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 6014665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:43:31+00:00 2026-05-23T02:43:31+00:00

The Data is stored in a Dictionary and arranged by month. (the string is

  • 0

The Data is stored in a Dictionary and arranged by month. (the string is what needs to be inserted.)

I have a preexisting excel file: it has all the dates of the year on the first column, and various entries in the following column. This data needs to be preserved.

My task is to basically insert the Dictionary into this excel file. What complicates things is that the Date value in the dictionary, needs to correspond to the date value in the excel column (date and month). To explicate: (“xxxx”, 1980-05-12) needs to be inserted into the excel column with the first cell as “12-May” (this was generated via Fill->series).

And I have no idea. I’m spluttering by on bits of programming I’d picked up a couple of years ago. I’ve already extracted the data from the web page, and sorted it and all – automating some of the boring manual work. But I am faltering at the last mile, and seriously do not want to manually enter a couple of thousand data points when I know a simple script would suffice.

So, any help would be appreciated.

  • 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-05-23T02:43:32+00:00Added an answer on May 23, 2026 at 2:43 am
    private void FindAndSetDate(WorkSheet ws, Dictionary<DateTime,string> dict)
    {
        Range find = null;
        foreach(KeyValuePair<DateTime,String> kvp in Dict)
        {
            find = ws.Cells.Find(kvp.Key, Type.Missing,
            Microsoft.Office.Interop.Excel.XlFindLookIn.xlValues, Microsoft.Office.Interop.Excel.XlLookAt.xlWhole,
            Microsoft.Office.Interop.Excel.XlSearchOrder.xlByRows, Microsoft.Office.Interop.Excel.XlSearchDirection.xlNext, false,
            Type.Missing, Type.Missing);
    
            if(find!=null) find.Offset[0,1].Value=kvp.Value;    
        }   
    
    }
    

    take a look at this thread How to iterate through a column in an Excel application through C# Console?

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

Sidebar

Related Questions

I have some data stored as ArrayList . And when I want to backup
If you have geographic data stored in ESRI shapes, you have at least three
I have a variety of time-series data stored on a more-or-less georeferenced grid, e.g.
I have a collection of data stored in XDocuments and DataTables, and I'd like
Greetings, I have data stored on mysql with delimiter , in 1 table. I
So, I'm trying to use ADO.NET to stream a file data stored in an
If the amount of data stored within a given field of a database is
Are there techniques for comparing the same data stored in different schemas? The situation
Recently I had to do some very processing heavy stuff with data stored in
I'm looking for a good way to visualize ASP.NET session state data stored in

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.