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 627503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:32:09+00:00 2026-05-13T19:32:09+00:00

I know there are a lot of questions on how to write data from

  • 0

I know there are a lot of questions on how to write data from a dataset or datatable to excel, but they all seem to assume a new blank excel workbook. I have a special excel file containing multiple sheets with lots of formatting, formulas, and a chart. I just need to lay data over the appropriate portions of some sheets and let excel handle the rest.

So I need a way to insert data into an existing excel file, at a certain range (which can vary depending on the number of rows), on certain sheets. Currently I’m using the COM interop to write it all which is a performance nightmare and needs to be changed. So what would be the best way to accomplish this?

More info: We have a simple mvc app that lets the user submit a request for data. It kicks off this console app as a seperate process to get the data and build the excel file. So first we get the data which takes 10-15 seconds, then we write the data to excel. It’s the actual writing of the values to the cell that appears to be taking all the time. Whether the formulas in the excel file are having an affect on the write I don’t know, but that is what I’m trying to avoid.

Update: As it turns out the formulas were the primary hindarence on the speed of the writes. I set the Calculation property of the Excel Application class to XlCalculation.xlCalculationManual and it runs much faster now! This isn’t the proper answer to my question but it’s what worked.

Thank you to shahkalpesh who did point this out, and Cj!

Thank you,
Jeff

  • 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-13T19:32:10+00:00Added an answer on May 13, 2026 at 7:32 pm

    I’ve experienced the same thing. COM Interop can be a pain… I don’t know your entire situation but you could simply export the datatable to XML. (Datatable.WriteXML) Then use VBA to suck the data in and do the parsing. It’d be cleaner to use all .NET but VBA is fast would probably be pretty fast.

    Aside from that I swear there was a nice free library out there that would simplify working in Excel for .NET. I don’t know what type of performance there is…. Another option is VSTO (VSTO Development Home) which depending on what you want to do might be a good fit as well. Good luck!

    Update: Here you go this is what I was looking for: File Helper

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

Sidebar

Related Questions

I know there are a lot of questions around on this subject, but I've
I know there are a lot of questions similar to mine, but I actually
I know there a lot of similar questions to this, but I didn't find
I know there's a lot of questions about this but I've been struggling with
I know there are a lot of similar questions on SF, but I think
I know there are a lot of such questions on stackoverflow but I couldn't
I know that there has been a lot of questions like this but I
I know there are a lot of related questions, I have read them but
I know there's a lot of questions on SO similar to this, but I
I know, there are already a lot of similar questions here but I did

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.