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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:53:52+00:00 2026-05-24T12:53:52+00:00

After exporting data using a third party component the data in the excel sheet

  • 0

After exporting data using a third party component the data in the excel sheet isn’t type correctly. Excel thinks that some values are string while they are numbers and a little green triangle shows up.

We’ve coded the following to fix this:

For Each objCell As Microsoft.Office.Interop.Excel.Range In objWorkSheetReport.Range(objWorkSheetReport.Cells(1, 1), objWorkSheetReport.Cells(Me.RowCount + 10, Columns.Count + 10)).Cells
    If IsNumeric(objCell.Value) Then
        objCell.Value = CDbl(objCell.Value)
    End If
Next

This removes all those little green triangles but is really slow.

The question

Is there a faster way to convert a Range of data quickly so the green triangles don’t show up?

  • 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-24T12:53:53+00:00Added an answer on May 24, 2026 at 12:53 pm

    Use the .SpecialCells() method of the range to narrow it down to only those cells that need to be changed.

    Assuming a range NarrowedRange and a worksheet Sheet (substitute your own range for A1:A8, and objWorksheetReport for your sheet)

    NarrowedRange = 
        Sheet.Range("A1:A8").SpecialCells(Excel.XlCellType.xlCellTypeConstants,
                                          Excel.XlSpecialCellsValue.xlTextValues)
    

    will get you only the text value elements of your original range, so just change those accordingly.

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

Sidebar

Related Questions

I am doing export of data from database to Excel. After exporting when opening
We're exporting a set of data using .net interop to Excel and our template
Am exporting data to csv. after 25000 records , memory exhausted. Memory limit increasing
After using the ebay API recently, I was expecting it to be as simple
After reading the Head First Design Patterns book and using a number of other
After being told by at least 10 people on SO that version control was
I'm developing a mechanism for interchanging data between two or more processes using shared
I am exporting an excel workbook into xml spreadsheet. The excel has lets say
I have a data grid in a view that is bound to a List
I am working on exporting a data.frame to a csv for use in an

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.