Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VSTO 2005 Storing format details as strings

Posted on 2006-11-20
3
Medium Priority
?
197 Views
Last Modified: 2010-08-05
Hi

How do you store the formatting details of a
formatted cell in a  managed spreadsheet?

eg the I need the color to be stored as a string variable for later use

0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 2000 total points
ID: 17980333
does this work?

' Work with the current active cell.
    Dim currentCell As Excel.Range = Me.Application.ActiveCell

'create a style on thw workbook
Dim style As Excel.Style = Globals.ThisWorkbook.Styles.Add("NewStyle")
'assign the style of cell to the style created
style = currentCell.Style

now you can reference the "style" on any other cell.
from another part in code
' Work with the current active cell.
    Dim currentCell As Excel.Range = Me.Application.ActiveCell
currentCell.Style = "NewStyle"


0
 

Author Comment

by:Murray Brown
ID: 17985661
Worked well. Thanks very much
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17986687
great. thank for the points!
NY
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question