LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Page Numbering with ActiveX

I've brought a data file into Excel from Labview using the ActiveX properties and methods.  I've formatted everything the way I like it to be displayed in the Excel file.  I can't find the Excel  property(s) that will display the page numbers, for instance in a footer or at the bottom of each page.  I'd like to use a footer with the "Sheet x of xx" format.  Anyone done this before?
 
Nick Salemi
Teledyne Energy Systems
410-891-2257
Nick Salemi
Teledyne Energy Systems, Inc.
nick.salemi@teledynees.com
410-891-2225
Message 1 of 9
(23,388 Views)
The LabVIEW Report Generation Toolkit for Microsoft Office has a VI that does this.  Specifically, it gets a reference to the ActiveSheet, then gets a reference to the PageSetup for that active sheet, then sets either the "LeftFooter", "CenterFooter", or "RightFooter" property of the PageSetup to a value of "Page &P of &N".
 
Let me know if you have any questions about the Report Generation Toolkit...we spent a lot of time discovering the answers to questions like this one and making VIs out of them.  🙂
 
-D
Message 2 of 9
(23,387 Views)
I would also suggest creating a macro of the operation and trying to reproduce it in labview using properties and methods.



Joe.
"NOTHING IS EVER EASY"
Message 3 of 9
(23,376 Views)

Thanks Darren,

I had a feeling it was simple.  Using a Worksheet property node tied to a Page setup property node with Right Footer displayed, I connected the code you suggested (Page &P of &N) from a text box to the Right Footer.  Works like a charm thru hundreds of pages!

Nick S

Nick Salemi
Teledyne Energy Systems, Inc.
nick.salemi@teledynees.com
410-891-2225
0 Kudos
Message 4 of 9
(23,361 Views)

Joe,

Heres some code.  Yell if the zip file does't make it.  Place the two files on the C:\ directory.

 

Nick Salemi
Teledyne Energy Systems, Inc.
nick.salemi@teledynees.com
410-891-2225
Message 5 of 9
(23,354 Views)
Thanks for the VI'S I will add these to my collection.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 6 of 9
(23,347 Views)

Joe,

You seem to know your way around the Dev. Zone discussion format.

How did my question get removed from the main board? I thought I'd have to do it myself.

Instead I found that it is only listed in My Subscriptions.  What did I miss?  What should I normally do to it?  Delete it or just leave it alone.

Thanks

 

Nick Salemi
Teledyne Energy Systems, Inc.
nick.salemi@teledynees.com
410-891-2225
0 Kudos
Message 7 of 9
(23,326 Views)

It did not get removed it just got pushed way down the list. When you ask a question it gets put on page 1 of the main board. and as more people ask questions it gets pushed down the list (very quickly) then when some replies to your question it gets put back at the top of the list. Lather rinse repeat. you can verfiy this if you want. Down at the bottom of the main page is an indicator to tell you what page of the main LV page you are on. A question just keeps getting pushed down the pages.

You cannot delete a Post. Only the board administrator can do that.

 

 

Hope this helps.




Joe.
"NOTHING IS EVER EASY"
Message 8 of 9
(23,315 Views)
0 Kudos
Message 9 of 9
(19,146 Views)