LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Column width problem writing to spreadsheet

Solved!
Go to solution

Hi everyone,

 

Does anyone know how to adjust the width of column when using that 'write to spreadsheet' vi in Labview?

 

I always have some long string as title and the excel file would only show part of it after I dump them to it.

 

I am not sure that width setting is by Microsoft Excel or Labview itself.

 

 

Any help is well appreciated,

 

Thanks a lot,

 

+Kunsheng

0 Kudos
Message 1 of 5
(3,258 Views)
Solution
Accepted by topic author Kunsheng Chen

Hi Kunsheng,

if you use the "Write to Spreadsheet File" function, then you can't set the width. You create only a txt file with this function, not a real excel file. For a real Excel File you have to use ActiveX.

 

Mike

Message 2 of 5
(3,255 Views)

Thanks, Mike. Yet what do you mean by 'not an excel file' ? I did got an excel file with that function so far. 

 

Seems we are bundled for that with Labview. 🙂

0 Kudos
Message 3 of 5
(3,239 Views)
The file that Write to Spreadsheet File creates is not even close to being a native Excel file. Giving a file the .xls extension does not make it an Excel file. Excel will automatically convert a text file with tab separated values and .xls extension. The file is still a text file that you can view with Notepad, for example. A plain text file does not contain any of the formatting that is in a native Excel file. As mentioned, in order to create a real Excel file, you need to use the Excel properties and methods - ActiveX.
Message 4 of 5
(3,236 Views)

In light of how often these questions come up where the spreadsheet file functions get confused with Excel (several times per day), I propose that NI make changes to the Read from Spreadsheet File and Write to Spreadsheet File icons.

Message Edited by Ravens Fan on 03-11-2009 10:49 PM
Message 5 of 5
(3,219 Views)