We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Color

I need a lot of help on this one. First you should know that your .CellStyle.FillPatern is misspelled. I apparently need this to know if the .CellStyle.FillBackground information is used. FillPattern of "None" for no, "Solid" for yes (simple case so far). When I ask for .CellStyle.Font.Color for a generic Excel spreadsheet cell, I get 0x7fff whereas I''m expecting Black of 0xff. None of the .CellStyle.Font.Color, .CellStyle.FillBackground, .CellStyle.FillForeground implement the .ToString() method, which might have allowed me to use System.Drawing.Color.FromName(), but that was just an attempt since I could find no conversions that would turn 0x7fff into a number

3 Replies

GR Greg April 25, 2004 09:42 AM

(sorry, touchpad problem and no Forum edit message capability) 0x7fff into a visible color like 0xff. Thanks for any help, Greg


AD Administrator Syncfusion Team April 26, 2004 06:22 AM

Hi Greg, Could you please clarify if my understanding of your requirements are correct. 1) We will implement the ToString method which returns names of colors like black, red etc or the RGB Values which can be used to create equivalent colors. 2) We will fix the spelling error in FillPattern. 3) we will add a property that checks if the pattern is solid or none mySheet.Range"A1"].CellStyle.FillPatern.HasSolidPattern; mySheet.Range"A1"].CellStyle.FillPatern.IsNone; Sorry for the inconvenience. Thanks. Best regards, Stephen. >(sorry, touchpad problem and no Forum edit message capability) > >0x7fff into a visible color like 0xff. > >Thanks for any help, >Greg >


GR Greg April 26, 2004 07:05 AM

Stephen, Your steps 1 and 2 will be good; 3 is unnecessary - don''t do it. My other issue (main one right now) is that the default font color I get from Excel is resolving to 0x7fff, which will not show up in my application. Microsoft black is 0xff. Please tell me if there is a function to convert the color I receive to an integer 0xff (a standard procedure for all colors, not a simple bit mask for this one case). Or perhaps this 0x7fff is an incorrect answer? Using the example test1/test2 (from the cross file reference issue), you will see fore and background colors in Excel. Can you retrieve and utilize those? When I fetch them via ExcelRW, I cannot then use these color numbers in my application to yield the same colors. Thanks, Greg >Hi Greg, > >Could you please clarify if my understanding of your requirements are correct. > >1) We will implement the ToString method which returns names of colors like black, red etc or the RGB Values which can be used to create equivalent colors. > >2) We will fix the spelling error in FillPattern. > >3) we will add a property that checks if the pattern is solid or none > >mySheet.Range"A1"].CellStyle.FillPatern.HasSolidPattern; > >mySheet.Range"A1"].CellStyle.FillPatern.IsNone; > >Sorry for the inconvenience. Thanks. > >Best regards, > >Stephen. > > >>(sorry, touchpad problem and no Forum edit message capability) >> >>0x7fff into a visible color like 0xff. >> >>Thanks for any help, >>Greg >>

Loader.
Live Chat Icon For mobile
Up arrow icon