在 07-13-2009 07:00 AM
Hi,
I'm want to use the excel report structure in LabVIEW. I want to format the graph so that only the start and finish values appear on the graph in excel. There doesn't appear to be a VI to do this. I also checked LabVIEW 8.5\examples\office\MSGraph Examples.llb but could not find this feature.
Does anyone know if there is anyway that I can do this using LabVIEW?
Thanks Sean
在 07-13-2009 07:06 AM
labview report generation for microsoft office 不可能將所有功能包含進去,
所以有一個VI,excel run macro VI
http://zone.ni.com/reference/en-XX/help/372120A-01/lvoffice/excel_run_macro/
在 07-13-2009 10:42 AM
So I guess the short answer is that LabVIEW does not have a VI to do this.
I tried the following macro:
Sub fun2()
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.TickLabelSpacing = 1000
.TickMarkSpacing = 500
End With
End Sub
I works fine with a graph created in excel but doesn't work with the one created by the LabVIEW VI's.
Unfortunately I am not an expert at VB macro's or indeed why LabVIEW is formatting in a strange fashion.
Are the LabVIEW VI's useless? Is it better to create ones own macro to create an excel graph? I've wasted a lot of time so far but if anyone has any ideas I'd be delighted to hear them.
Plan B is to create a template with the graphs already formatted and insert the numbers. I don't want to do this the template is very big and time consuming to open but in the absence of a better solution.....
在 07-15-2009 02:12 AM
您的macro我這裡無法執行,可以提供完整的 macro code嗎?
在 07-15-2009 03:08 AM
Hi Fatty,
Thanks for you previous reply. You seem to be puzzled by the concept of macro code.
If a person create a macro to be run using the VI you suggested, the macro itself is composed of code.
If anyone can suggest code to modify the graphs created using NI's macro's I'd appreciate it.
Rgds,
Sean