Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to set style in Range object?

Hi all:
I have two cells:
A B
1 Cell1, Cell2

---------------------------
In excel , i manually set "Cell Styles" to them with "Check Cell", "Heading
1" ... etc.
Question:
I want to code (c#) Cell1 ,Cell2 with such Style, how could i do ?

Sample code is welcomed , especially for c# code.
Thanks in advanced.

Ding Li
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default How to set style in Range object?

Use macro record - you will see the something like
Selection.Font.Superscript = True

Simply use your Excel.Range Object (or OLE) to change the desired
values.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to set style in Range object?

I can't use macro record because I have to create a new blank excel sheet.
So , is there any c# solution ?

"NOPIK" wrote:

Use macro record - you will see the something like
Selection.Font.Superscript = True

Simply use your Excel.Range Object (or OLE) to change the desired
values.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default How to set style in Range object?

What do you mean by "I need to create a blank sheet"?
I meaned simple action: Open Excel record macro Cut&Paste Macro into
your code, close Excel, correct objects for your namespace.
Or you don't know how to perform Excel.Application.Workbooks.Open ?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to set style in Range object?

I got your idea. Record what you have done in excel and take advantage of
these codes.
Thanks, i will try.

"NOPIK" wrote:

What do you mean by "I need to create a blank sheet"?
I meaned simple action: Open Excel record macro Cut&Paste Macro into
your code, close Excel, correct objects for your namespace.
Or you don't know how to perform Excel.Application.Workbooks.Open ?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel.Style object: Border problems snoriidr Excel Programming 7 February 9th 07 04:02 PM
Checking for the border style of a range Peter Rooney Excel Programming 4 January 9th 06 09:23 AM
A1 style Range in programming [email protected] Excel Programming 3 September 1st 04 02:43 PM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"