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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:25:30+00:00 2026-06-13T17:25:30+00:00

I am putting a string into excel. The string is often only numeric digits

  • 0

I am putting a string into excel. The string is often only numeric digits but can have alpha characters or hypens etc.

When I don’t set the number format or set it like this
(Where xlSheet(0) is Excel.Worksheet)

xlSheet(0).Columns("N:N").EntireColumn.Columns.NumberFormat = "@"

It outputs in scientific notation.

When I use this code:

xlSheet(0).Columns("N:N").EntireColumn.Columns.NumberFormat = "0"

It rounds up the number to the nearest 100,000 so that the last five digits are 0’s when they shouldn’t be.

Should be: 1539648751235678942
But is: 1539648751235600000

The cells that have a hyphen or a letter aren’t affected and work fine.

Any help would be greatly appreciated.

EDIT:

I add the data like this:

I loop through and put in xlSheet(0).Cells(i, 14) = rs!value_number

Where rs is my ADODB.Recordset

EDIT2: Herbert Sitz got it by adding an apostrophe before the text! Thanks everyone.

  • 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-13T17:25:31+00:00Added an answer on June 13, 2026 at 5:25 pm

    I think problem is that the number you’re trying to enter can’t be accommodated exactly by Excel. Excel has limitations on what numbers it display/represent because of the way numbers are stored internally. In Excel’s case numbers are limited to 15 digit precision (see http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx ), which is not enough to represent your number.

    You can enter the number as a string (“152..42”) and all digits will be displayed, but you won’t be able to perform exact mathematical operations with it.

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

Sidebar

Related Questions

I'm putting a concatenated string into the Tag property of a component this way:
i am putting <input type=text name=Job Name value=/> inside private List<String> dataFields; and iterate
When putting a favicon on your site, you can apparently use an animated gif,
I have a datetime string like so: > mydatetime [1] 2012-01-07 14:53:52 EST 2012-01-07
I am trying to echo out some JavaScript, but I can't get the formatting
I'm attempting to perform dynamic sorting of data that I'm putting into grids into
I have a string: $departmentList = value:'16:NAR,JR'S OFFICE;17:MFR'S OFFICE;18:NAR/MFR JOINT OFFICE' My problem is,
Could someone show me how I would input a string into a method and
This method works OK, but if I add delayed_job's handle_asychronously, I get can't convert
I have a problem which has an solution that can be solved by iteration,

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.