LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read cell widths from an excel file - Report Generation Toolkit

Solved!
Go to solution

Hi,

 

When I use the "Append Table to Report" or the "Excel easy table" VIs to insert data to a template excel file then LabVIEW changes the width of the columns. This is very inconvenient since I have to inject the data to a customer provided template file.

 

I can not use the "easy text" VI (which preserves the cell width) because this VI is very slow.

 

Is there anything like "Query cell width" vi. Then I can check the original width of the columns and after I have dumped the data I can restore the widths?

 

thx. 

0 Kudos
Message 1 of 3
(2,735 Views)
Solution
Accepted by topic author 1984

Hi 1984,

 

you are right the Append Table Report will change the column width, based on what is specified on the column width and the measurement system for column width inputs. However if you set the column width to -1 than the cells in template will not be modified.

 

To answer your question, there is no specific VI which will give you the excel cell width, however you can use the activeX calls and get that information. If you open the Excel function you can see how these Excel ActiveX calls are performed.

 

I hope this answers your question.

 

Regards,

 Barna Dobai

National Instruments 

0 Kudos
Message 2 of 3
(2,706 Views)
Great! Thanks man! From now on -1 is my favourite number!
0 Kudos
Message 3 of 3
(2,700 Views)