LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I scale an excel spreadsheet printout so that it is only one page wide using the report generation tools?

I have test results that appear in a spreadsheet format--tab delimited text.  I wish to print those results using the report generation tools using an excel format.  Does anyone know how to scale the printout so that I can limit the width to one page?

0 Kudos
Message 1 of 6
(3,542 Views)

Hi Eugene,

 

Good evening and I hope your well today.

 

I am not infront of a LabVIEW machine at the moment - so I cant check the API in the Report Generation Toolkit, but I do remember that printing doesn't have many options - I believe number of copies.. being one of afew. 

 

I guess you could make sure the number of columns/rows weren't bigger than the max size for one page - but I guess your referring more to the options say Excel would give you when you print? If so, have you considered the ActiveX interface for excel. I have helped customers use this to print a range of pages before. I haven't tried it, but I am sure you could experiment alterting printout options.

 

Please let me know your thoughts,  and i can help you with activeX stuff if you wish.

hope this helps,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 6
(3,533 Views)

James,

 

You are right about what I am looking for.  Here's what I want to do.  When I instruct the program to print, I want it to bring in the tab delimited text, lay it out in a spreadsheet, have the columns automatically adjust width to accommodate the widest data element, and then scale the entire printout so that it is equal to the width of landscape 8 1/2 X 11 paper.

 

My skills with activeX are very limited.  I have looked for a property to allow scaling and could not find it.  If you could help me with this need I would greatly appreciate it.

 

Thanks so much.

 

Eugene

 

Smiley Happy

0 Kudos
Message 3 of 6
(3,514 Views)

Hi Eugene,

 

Thanks for the update and I hope your well today.

 

So for the delay...

 

Do you have any example code which I could use as a base to look into your issue further?

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 6
(3,473 Views)

James,

 

Attached is some code I have tried along with an example tab delimited text file that I would like to print out.  I want the printout to be landscape mode on 8 1/2 X 11 and I want it to automatically adjust to one page wide for the printout.  I would like to have the gridlines printed as well.

 

Eugene

Download All
0 Kudos
Message 5 of 6
(3,455 Views)

Hi Eugene,

 

Good afternoon and I hope your well today.

 

I was looking at your issue again this morning, and started coding some Excel Active X code but then came across the following

 

Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit: Introduction

http://zone.ni.com/devzone/cda/tut/p/id/3178

 

The example code includes cell bordering, setting borderes of an array of cells and report layout - landscape for printing.

 

I would recommend having a look through this, as I feel this largely applys to the area your looking at right now.

 

Please let me know how you get on,

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 6
(3,434 Views)