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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:50:16+00:00 2026-06-04T04:50:16+00:00

No, ADO.NET will not solve my problem because the excel files I’m working with

  • 0

No, ADO.NET will not solve my problem because the excel files I’m working with do not contain information in tabular form. In other words, there is nothing to query, and the name of the sheets and number of sheets will vary.

essentially my job is to search every single cell in an excel document and validate it against some other data.

Right now all I have is a byte[] array that represents the contents of an .xls file. Converting to a string is meaningless since it’s just binary data.

If I use COM interop and run Excel in the background, is it possible to inject it with binary data in byte[] array form or do I have to save the file to disk and then automate the process of opening it and scanning each row?

Isn’t there an easier way to do it?

  • 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-04T04:50:17+00:00Added an answer on June 4, 2026 at 4:50 am

    How do you read the binary data of an excel file (.xls) using .NET
    There are a number of ways, the excel file format has changed a few times so reading the files natively is hard work and version dependent, it’s usually not recommended. For reading tabular data most people choose ADO.NET, but as you allude, if you need any formatting or discovery then MS would recommend COM Interop.

    If I use COM interop and run Excel in the background, is it possible to inject it with binary data in byte[] array form

    The excel COM object model does allow you to bulk set data to a Range object you set it with a 2 dimensional object array (object[,])

    or do I have to save the file to disk and then automate the process of opening it and scanning each row?

    No, you can interact with the “out of process” COM server (Excel) without having to save first, you can set your data, format it etc in memory.

    Isn’t there an easier way to do it?
    Yes there is, checkout Spreadsheet Gear their object model is nearly identical to the com model, however you do not need Excel involved at all, it is also an order of magnitude faster working with large data. Its not cheap ($1000 bucks last time I checked) but will save you way more than that in coding effort. (I am not affiliated with Spreadsheet gear in any way)

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

Sidebar

Related Questions

I want to use ADO.NET Prepare command will increase performance if query is repeatevely
from here Im having trouble understanding they say that ado.net does not include a
I am new to ADO.net and have this problem: Let's assume I have these
I am using mysql/ado.net/C# heres my problem I know mysql is concurrent, however i
In ADO.NET i'm using GetSchemaTable to return the schema table for a results set.
Does Ado.net check if the following update is required? ADDRESS table with a TOWN
In Ado.net, the code is calling a stored procedure with input and output parameters.
Suppose I have an ADO.NET DataTable that I was to 'persist' by saving it
I'm new to ADO.NET so asking for help. I have to insert large number
In the ADO.Net Entity Framework, I have an object which has 4 references to

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.