LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

auto columns width (in Excel)

Help me plase!
When I export data from LabView to Excel, cells (in Excel) has standart width. Which column property (in LV) make auto column width (in Excel)?
0 Kudos
Message 1 of 6
(3,751 Views)
If you're using standard functions (not the ActiveX Excel stuff), I don't think there's a way to autosize the columns.

That's easy enough in Excel though:

Shade all your columns with data and double click one of the column resize bars (the vertical bar between column A header and column B header for example). Wa-la... all shaded columns get auto-sized.
0 Kudos
Message 2 of 6
(3,744 Views)
I want do to this from LV (not in Excel document)!
0 Kudos
Message 3 of 6
(3,736 Views)
Your best bet then will be to download an LV ActiveX Excel library such as the one written by Philips Research for Excel 97 (easily modifiable for later versions of Excel). I'm not sure if the functions available via ActiveX will be able to do what you want, but they do a whole lot more than just exporting data. You might be able to figure out how to do what you're trying to do with a good LV Excel library and a little bit of research into the ActiveX methods and properties available for an Excel worksheet.
0 Kudos
Message 4 of 6
(3,728 Views)
If you are using ActiveX to control Excel, you can import your data into a new workbook. Then use the ActiveX property Columns to feed the method AutoFit.
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 5 of 6
(3,710 Views)
Bingo!
0 Kudos
Message 6 of 6
(3,705 Views)