10-29-2012 10:05 AM
Hello everyone,
I'm creating a LV program that is filling an Excel report with different data – string or number. However, all the cells I'd like to fill feature a named range (one name per cell). Does anybody know if some VI can get the named ranges of a cell and proceed operations on it, such as filling or testing if the range exists? Moreover, I'd rather work with the named range of a cell than its position.
I'm working on NI DS 2012 SP1.
Thank you very much for your answer,
Mika
10-29-2012 10:46 AM
Have a look at this:
http://digital.ni.com/public.nsf/allkb/180EA23CF468B3C186256EA2007BE83A
10-29-2012 11:20 AM - edited 10-29-2012 11:22 AM
Hello Mika,
all the Settings of MS-Excel could be defined by using "ActiveX". You can find the Cell by Position, and rename the Cell, or u can search the renamed Cell. It is based on the MS-Excel Principle. If u cant do it with the LabVIEW Report OfficeToolkit. First of all, you should find the related Function such as the Function of Range http://msdn.microsoft.com/de-de/library/microsoft.office.interop.excel.range.columns(v=office.11).as... . Then u can do it in LabVIEW with the same Principle, relevant Example could be found in Google(search "Excel via Activex in LabVIEW " for example).
Hope that helps, 🙂
APD
10-29-2012 12:56 PM
If you don't have the Report Generation Toolkit, you can still access named ranges, it's just a bit more work. Here's an example of reading a named range in Word; Excel has similar properties and methods. http://forums.ni.com/t5/LabVIEW/activex/m-p/2171036#M698572
10-31-2012 03:33 AM
Hi everyone,
thank you very much for all of your answers. I tried all of them but none of them gave me entire satisfaction for my program. I'm posting my solution as soon as I end it – the method needs a Excel Macro. Anyway, thank you again for the different methods that brought me some ideas.
Kind regards,
Mika
10-31-2012 10:06 AM
If you post the contents of the macro, there's a good chance we can show you how to do the same thing in LabVIEW.
10-31-2012 06:05 PM
I assume you can call/use excel macros through ActiveX. 🙂
/Y