Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Detect text styles...

Is there a way to detect the styles (CSS type like font-color, font-
weight, color, text-decoration, etc.) applied to the text (not the
cell itself) in an excel cell?

I was hoping to be able to extract a string with embedded/nested span
elements with styles applied to describe the text in a cell... I know
this is probably a pipe dream but there must be a way to extract this
info... can anyone help?

BTW, I will be using VB.NET to automate excel to perform this
function... suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Detect text styles...

Is this the one you are looking for

cells.Font.Name
cells.Font.ColorIndex (OR .Color)
Cells.Font.Size

If this post helps click Yes
---------------
Jacob Skaria


"emailceloftis" wrote:

Is there a way to detect the styles (CSS type like font-color, font-
weight, color, text-decoration, etc.) applied to the text (not the
cell itself) in an excel cell?

I was hoping to be able to extract a string with embedded/nested span
elements with styles applied to describe the text in a cell... I know
this is probably a pipe dream but there must be a way to extract this
info... can anyone help?

BTW, I will be using VB.NET to automate excel to perform this
function... suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Detect text styles...

On Apr 17, 11:06*pm, Jacob Skaria
wrote:
Is this the one you are looking for

cells.Font.Name
cells.Font.ColorIndex (OR .Color)
Cells.Font.Size

If this post helps click Yes
---------------
Jacob Skaria

"emailceloftis" wrote:
Is there a way to detect the styles (CSS type like font-color, font-
weight, color, text-decoration, etc.) applied to the text (not the
cell itself) in an excel cell?


I was hoping to be able to extract a string with embedded/nested span
elements with styles applied to describe the text in a cell... I know
this is probably a pipe dream but there must be a way to extract this
info... can anyone help?


BTW, I will be using VB.NET to automate excel to perform this
function... suggestions?


jacob,
i'm not just isolating my style search to those attributes but instead
ANY styles that can be applied to the text (underline, bold, italic,
size, color, etc.). The text could have any number and combination of
styles, so I don't want to 1sey 2sey the text in the cell b/c I'd have
to end up checking each character for all its styles which seems awful
ineficient...

I was thinking I could save the spreadsheet as an XML file then mine
the styles of the text <Worksheet<Table<Row<Cell<Data tags
there... but that seems like overkill... any other ideas or tweaks on
this idea?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Detect text styles...

I understand you want this formattig info to be used in a report which is to
be generated from a .NET application. Another way of doing this is to format
an excel file in the way you need in MS Excel itself and save this workbook
as a template. (you can even rename this..and add to your installation kit).
What the program would do is copy this template and populate data and save as
the final report....

If this post helps click Yes
---------------
Jacob Skaria


"emailceloftis" wrote:

On Apr 17, 11:06 pm, Jacob Skaria
wrote:
Is this the one you are looking for

cells.Font.Name
cells.Font.ColorIndex (OR .Color)
Cells.Font.Size

If this post helps click Yes
---------------
Jacob Skaria

"emailceloftis" wrote:
Is there a way to detect the styles (CSS type like font-color, font-
weight, color, text-decoration, etc.) applied to the text (not the
cell itself) in an excel cell?


I was hoping to be able to extract a string with embedded/nested span
elements with styles applied to describe the text in a cell... I know
this is probably a pipe dream but there must be a way to extract this
info... can anyone help?


BTW, I will be using VB.NET to automate excel to perform this
function... suggestions?


jacob,
i'm not just isolating my style search to those attributes but instead
ANY styles that can be applied to the text (underline, bold, italic,
size, color, etc.). The text could have any number and combination of
styles, so I don't want to 1sey 2sey the text in the cell b/c I'd have
to end up checking each character for all its styles which seems awful
ineficient...

I was thinking I could save the spreadsheet as an XML file then mine
the styles of the text <Worksheet<Table<Row<Cell<Data tags
there... but that seems like overkill... any other ideas or tweaks on
this idea?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Detect text styles...

On Apr 17, 11:46*pm, Jacob Skaria
wrote:
I understand you want this formattig info to be used in a report which is to
be generated from a .NET application. Another way of doing this is to format
an excel file in the way you need in MS Excel itself and save this workbook
as a template. (you can even rename this..and add to your installation kit).
What the program would do is copy this template and populate data and save as
the final report....

If this post helps click Yes
---------------
Jacob Skaria

"emailceloftis" wrote:
On Apr 17, 11:06 pm, Jacob Skaria
wrote:
Is this the one you are looking for


cells.Font.Name
cells.Font.ColorIndex (OR .Color)
Cells.Font.Size


If this post helps click Yes
---------------
Jacob Skaria


"emailceloftis" wrote:
Is there a way to detect the styles (CSS type like font-color, font-
weight, color, text-decoration, etc.) applied to the text (not the
cell itself) in an excel cell?


I was hoping to be able to extract a string with embedded/nested span
elements with styles applied to describe the text in a cell... I know
this is probably a pipe dream but there must be a way to extract this
info... can anyone help?


BTW, I will be using VB.NET to automate excel to perform this
function... suggestions?


jacob,
i'm not just isolating my style search to those attributes but instead
ANY styles that can be applied to the text (underline, bold, italic,
size, color, etc.). The text could have any number and combination of
styles, so I don't want to 1sey 2sey the text in the cell b/c I'd have
to end up checking each character for all its styles which seems awful
ineficient...


I was thinking I could save the spreadsheet as an XML file then mine
the styles of the text <Worksheet<Table<Row<Cell<Data tags
there... but that seems like overkill... any other ideas or tweaks on
this idea?


Thanks for the suggestion Jacob but this is not for a report - I'm
actually targeting a database with the info but need to preserve the
excel text formatting using the styles of a span, or nested span, tags
in the string that is stored in the db...
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
Stop carrying over text styles when pasting J. Lou Excel Discussion (Misc queries) 4 August 22nd 08 09:34 PM
How do I add text box styles to a worksheet? Ed Excel Programming 4 February 27th 08 03:41 AM
How do I add text box styles to a worksheet? Ed Excel Discussion (Misc queries) 0 February 24th 08 12:07 AM
Excel Cell Styles - Quick Styles? Dean@DCF Excel Discussion (Misc queries) 0 November 15th 07 10:40 PM
mix font styles in concatenated text Lakeside Steph Excel Worksheet Functions 2 May 26th 06 05:46 PM


All times are GMT +1. The time now is 09:46 AM.

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

About Us

"It's about Microsoft Excel"