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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:28:24+00:00 2026-05-25T15:28:24+00:00

I am making another windows form application , but some weird things are happening

  • 0

I am making another windows form application , but some weird things are happening , first example i have a value 0076464688334 , in my excel sheet i am reading them using..

        MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + fileName + "';Extended Properties=Excel 12.0;");
        MyConnection.Open();
        myCommand.Connection = MyConnection;

      DataSet ds = new DataSet();
        String qry = "SELECT number FROM [Sheet1$]";
        OleDbDataAdapter odp = new OleDbDataAdapter(qry, MyConnection);
        odp.Fill(ds);

NO when i have all the values in dataset i loop them n do some thing , but the problem is the value i mentioned above all all those who have zero at front become like .

         0076464688334  = 76464688334 

I kind on replaces 0 with %0 and in code %0 with 0 and it solved , now another problem is that i have a value it is becoming…

         824968717929  = 8.2496871793e+011

These are bar codes and i need exact match , can not find how to solve them , help please :).

Thank you in advance to all..

Additional code:

       for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[i][0].ToString() != "" )
                {
                    googleList.Add(ds.Tables[0].Rows[i][0].ToString().Replace("%0", "0"));


                 //   EbayList.Add(ds.Tables[0].Rows[i][0].ToString());

                    string tmp = string.Empty;
                    tmp = ds.Tables[0].Rows[i][0].ToString().Replace("%0","0");
  • 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-25T15:28:24+00:00Added an answer on May 25, 2026 at 3:28 pm

    You should change the type of the cell in excel because the values in the cell are transformed to simple numbers.

    To do that you can set the Format to text, which will then be mapped to a string with your reader.

    Alternatively you can use the COM interfaces to read your spreadsheets or try this one:

    ExcelDataReader

    if they are in open office format (.XLSX files) you can use

    EPP Plus

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

Sidebar

Related Questions

I am making a Windows Form in C#. I have a menustrip (File, Edit,
I'm making a C# windows form application that needs to parse data from an
Making my first steps with NHibernate, I'm trying to have it creating my Tables
I have a Windows forms application written in VB.NET where I host multiple WebBrowser
I'm making an appication that needs to maximize the window of another application. In
for school we are making an air application and we've run into some questions,
I have a project with multiple forms and when, for example, Form A opens
I have a JSP program that displays a form where the user enters some
i have a c# powered windows form app and i want to run a
First some background, we are creating a new eGov application. Eventually, a citizen can

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.