03-02-2016 03:54 AM
hi,
How can i add Column and Row header programatically to excel file. I am using activex component in labview8.2.and i don't have report generation toolkit.
03-02-2016 04:23 AM
Hi Gokul,
usually you write row headers in an Excel sheet in column A, starting with row 2.
Column headers go into row 1, starting with column B.
The values of your table would start at cell B2.
Why don't you write all your data to the corresponding cells?
03-02-2016 05:13 AM
hi,
i changed cell value range B2.but still now i error generate rowinput properity node.
1).and i have data is more than one xl sheet.so i want all xl sheet column and row value.because i try add column data in value table before it will work.but second xl sheet not show colum header. that why i am try row and columinput property methode.
03-02-2016 06:52 AM
GokulGKM a écrit :hi,
i changed cell value range B2.but still now i error generate rowinput properity node.
The Range.Table method has nothing to do with adding column and row header, don't use it. As GerdW said you need to add headers the same way you added the data: add column headers to range B1:E1 and column header to range A2:A56.
For the column header, Excel render a 1D Array as a row range, to make it a column range you need to convert ColHdrs[] to a 2D array (using build array function) and then use Transpose 2D Array.
Ben64
03-03-2016 07:46 AM
When I got started in LabVIEW (LabVIEW 7.0), we used the MS Office Toolkit to read/write Excel. I eventually learned enough ActiveX to be able to do things a little more flexibly, but it was really a struggle, not made any easier when I migrated from Windows XP to Windows 7, from Office 2007 to Office 2010, and when Microsoft started dropping support for ActiveX.
Fortunately (for me), LabVIEW came out with the Report Generation Toolkit, with the new Object model for Reports, and suddenly not only did it become much easier to interact with Excel, it became about an order of magnitude faster. In our original code, we had all sorts of elaborate schemes to "pre-read" the next row of an Excel Worksheet to save the second or so it would have taken had we wanted to read/parse the data "when we needed it" (we were controlling a behavioral Experiment, with each Row corresponding to the set of stimuli to be presented during the Trial represented by the row). In developing "Version 2" of this ancient code, I used the RGT and found that I could read and parse a row in about 40 msec (there were quite a few columns, I'm guessing 70-100).
There's been a lot of progress made in LabVIEW code since LabVIEW 8.2. There's also been some improvement to operating systems (we're now up to Windows 10 ...). Depending on how serious and important the project that you are developing, an upgrade to a more modern system may have significant payoffs.
Bob Schor
03-03-2016 08:01 AM
03-05-2016 09:51 AM
hi,
yes thanks..but i don't have report generration toolkit..this my old project.so i need wthout RGT how to use column header in Xl.i used what you say it work but my data go more than 1 Xl sheet the second xl sheet can not show column header in second sheet.
03-05-2016 12:24 PM
03-07-2016 03:53 AM
yes correct how can i know about how many worksheet programatically based on my data...
03-07-2016 08:13 AM
@GokulGKM wrote:yes correct how can i know about how many worksheet programatically based on my data...
We have no idea how your data is acquired and of the size of your data. xlsx worksheet have a maximum of 1 000 000 rows. Is your data bigger than that?
You can always split your data array.
Ben64