07-08-2009 03:11 PM
07-08-2009 03:21 PM
Are you using the office report generation toolkit? There is a set cell allignment vi. Otherwise you will have to use activeX interface to excel.
07-08-2009 03:49 PM
07-08-2009 03:52 PM
07-08-2009 04:03 PM
Yes, I realize that Dennis. I have not used the toolkit before. My application actually makes extensive use of a couple of activeX containers containing Excel Spreadsheets in various areas, but when I'm all done, I just capture a range of cells from the ActiveX excel spreadsheet on my main front panel tab, and copy them to a text file, which is appended each time the vi is run. It seemed like the Write to Spreadsheet File was the most straightforward approach. I'm looking at the Easy text report VI, but that does not seem to provide what I need. Can you explain more? I know my questions are basic, but I'm doing my best...
07-08-2009 04:11 PM
07-10-2009 09:44 AM
07-10-2009 10:08 AM
07-10-2009 12:47 PM
07-13-2009 06:12 PM
Dan, there is indeed a way to do this. You will need to open a .NET reference to the cells you are trying to write to in Excel. The methods to do this are contained in the .NET palette of the Connectivity palette. You will have to consult Microsoft for documentation on what .NET objects and parameters must be modified to allow this. This method is very complicated and time consuming, and it is because of this that we created the Microsft Office Report Generation Toolkit. It is a complete abstraction of all of the .NET references needed to manipulate MS format files, and standard windows text field properties.
Alternatively, there is probably a standard format for spreadsheets that can be read on all computers, just like rich text format. Im not sure exactly what you would need to modify to obtain the desired result. But windows gets the info from tsomewhere in the file, pehaps some meta data. Research into exactly what character or piece of data must be written to the file, and where in the file it must be written to would narrow your objectives and make it easier to accomplish in LabVIEW by brute force. However low level file formatting is beyond my expertise.