Advertisement

[x]
Attachment Details

Setting Cell/Range Format using OWC11 & C#

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.6
Tags: ,
Hi:

I'm running into sum inconsistencies/issues when attempting to programatically a cell format.

I would like to set a cell to be of type "text"
(I need to do this for various reasons further downstream)

In attempting to set a cell's format to "text," I want to preserve various text formatting on the incoming data values.

So if I set a cell's value to be 0026 would still be a text field with value: 0026 in my spreadsheet,
Likewise 6/12/2001, would be a text field with the value: 6/12/2001 in my spreadsheet.

However, if I use  set_NumberFormat("Text") to attempt to set the cell's formatting, the values appear to get corrupted so that:

0026  -- becomes -->> T1900xt in my resulting spreadsheet cell

I have similar issues surrounding the date format. I want to be able to set field value as having text format. However, if you directly set the field value via range.Value2="2/2/2002", OWC11 automatically changes the cell's format to be that of type "Date".

I both above instances, I want to be able set my cells to be of type/format: Text.

Thanks,
JohnB
Related Solutions
Related Solutions
 
Loading Advertisement...
 

Rank: Genius

Accepted Solution by rorya:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Expert Comment by Fenra:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Administrative Comment by roos01:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Administrative Comment by Computer101:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
Loading Advertisement...
20080924-EE-VQP-40 / EE_QW_2_20070628