06-15-2010 04:52 PM
I have looked at some examples of formatting the cells in Excel, and they have a "range" input which I do not know how to generate or where it comes from. I would like to do something like make the font bolded from cells A4:D4. I want to play with the color and column widths, but I think I can figure that out if I know where these inputs come from and how to tell a property node which file to operate upon. Thanks,
Gregory
Solved! Go to Solution.
06-15-2010 05:58 PM
A Range object refers to a range of cells. It is one of the classes in the Excel object model. You can create a Range object in several ways. One way is to simply use the Range method of a Worksheet object. If you look at the "Write Table to XL" example that ships with LabVIEW there's a subVI called "Set Cell Value". That shows you how a Range object is created so that its value can be set. In this case the Range is one cell, but the Range can be multiple cells. Some of the properties for a Range are themselves other objects. For instance, to set a bold font you need to write to the "Font" property of a Range object. The "Font" property is itself another class (Excel.Font).
All of the above is standard ActiveX (nothing to do with LabVIEW), so you basically need to understand ActiveX programming. With respect to Excel, there have been numerous examples posted to do various things, and the community has created the Excel thread to collect links to examples. You should peruse that thread to get links to all sorts of examples. NOTE: Do not post a question in that thread - it is a repository of links only.
06-15-2010 06:04 PM
06-15-2010 06:48 PM
06-16-2010 12:52 PM
06-16-2010 12:55 PM
06-16-2010 12:58 PM
06-16-2010 01:00 PM