LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I input column headers in an Excel report with variable width columns?

Solved!
Go to solution

Well, you always have control to write the data into excel file, you can write 500 rows of data in page 1 and then move to page 2 and similarly page 100 if you want to.

 

As far as I see you read the data from from database and dump the same data to the excel file,. you can write how much ever data you want to correct ? Tryout programming in this fashion.

0 Kudos
Message 11 of 20
(3,052 Views)

Here is the vi I am working with. It is saved to the frame where the column headers are created. The next frame is a for loop which first gets the next database record, then applies it to the report.

0 Kudos
Message 12 of 20
(3,045 Views)

This is a fictional worksheet generated by the vi to show what it will look like.

0 Kudos
Message 13 of 20
(3,039 Views)

Alright, Instead of using Increment Column VI use the "EXCEL EASY TEXT.VI " to update your column name and make use of start and end index to control your column index. This will avoid the use of basic report generation API.

 

Looks like you have lots of column to update, but I can see that you have sequence inside sequence inside sequence, you can really modify the logic and come up with better ones.

 

Well in my earlier reply I meant use the EXCEL EASY TEXT VI to update the column names, and since you get the data from the database you can write data in a loop at once instead of writing into variable and then writing into excel sheet.Use "EXCEL EASY TABLE" to write the data into excel file at once, remember to properly program the start and end inputs.

 

Attaching the excel sheet generated from my program and see the wonders what we can do from NI report generation toolkit

 

Have attached some programs of my project

0 Kudos
Message 14 of 20
(3,038 Views)

Awesome! I think you have put me on the right track. I will try your suggestions and post back.

 

Thank you!

0 Kudos
Message 15 of 20
(3,033 Views)

SciManStev,

 

Do the headers just need to show up when the report is printed?

0 Kudos
Message 16 of 20
(3,012 Views)

Yes. Only when the report is printed. Several copies of the report are passed out at meetings for review. On the monitor itself, I don't care.

 

0 Kudos
Message 17 of 20
(3,010 Views)
Solution
Accepted by topic author SciManStev

SciManStev,

 

Very easy way to do this.  In Excel its called 'Rows to repeat at top:'   You can access the setting using ActiveX.  I've attached a simple example that sets Row1 of worksheet to be repeated at top of each printed page.

 

 

 

 

 

 

 

Message 18 of 20
(3,005 Views)

I think that is just perfect! I was hoping it would be that easy! Thank you both very, very much!

0 Kudos
Message 19 of 20
(2,995 Views)

I have exported the table with "excel specific vi's" with column headers data at the top of the  1 st page. but, I want to add column headers to each page of the excel report programmatically.

 Can anyone give me the answer.

0 Kudos
Message 20 of 20
(2,736 Views)