How to query the total number of columns and lines filled with data?

How to get the number of rows and columns in Exel file data using Excel report?

Since you have posted this question in the forum of LabWindows/CVI, I guess you want to know how to do with CVI.

You need to know how to open and activate the Excel data file.

Depending on the function returns the total number of columns and lines col_count row_count, respectively.

-----------------------------------------------------------------------------------------------------------------------------------------

int CountColumnsAndRows (void)
{
Error HRESULT = 0;
CAObjHandle rangeCurrentRegionHandle = 0;
CAObjHandle rangeColumnsHandle = 0;
CAObjHandle rangeRowsHandle = 0;
  
unsigned long col_count = 0, row_count = 0;
  
Must use the 'A1' property and CruuentRegion count the total of columns and lines, including the drafts!
  
error = CA_VariantSetCString (& MyCellRangeV, 'A1');
  
error = Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyCellRangeV, CA_DEFAULT_VAL, & ExcelRangeHandle);
If (error<0) goto="">
  
error = Excel_GetProperty (ExcelRangeHandle, & ErrorInfo, Excel_RangeCurrentRegion, CAVT_OBJHANDLE, & rangeCurrentRegionHandle);
If (error<0)  goto="" error="">
  
error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeColumns, CAVT_OBJHANDLE, & rangeColumnsHandle);
If (error<0)  goto="" error="">
  
error = Excel_GetProperty (rangeColumnsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & col_count);
If (error<0) goto="">
  
error = Excel_GetProperty (rangeCurrentRegionHandle, & ErrorInfo, Excel_RangeRows, CAVT_OBJHANDLE, & rangeRowsHandle);
If (error<0)  goto="" error="">
  
error = Excel_GetProperty (rangeRowsHandle, & ErrorInfo, Excel_RangeCount, CAVT_LONG, & row_count);
If (error<0) goto="">

Error:

CA_VariantClear (& MyCellRangeV);
CA_VariantClear (& MyVariant);
ClearObjHandle (& ExcelRangeHandle);
ClearObjHandle (& rangeCurrentRegionHandle);
ClearObjHandle (& rangeColumnsHandle);
ClearObjHandle (& rangeRowsHandle);
  
 
If (error<>
ReportAppAutomationError (error);
  
error return;
}

Tags: NI Software

Similar Questions

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • How to list the Total number of messages in the specific queue

    Hi all
    Message queue
    How to list the total number of messages in the specific queue using wlst

    Published by: 666666 on 8 March 2012 04:42

    You might have more luck post it on the forum JMS...

  • How to determine the total number of images in the external .swf file loaded

    I have to be able to load both external .swf files and make them play in order. To do this, I need to know the number of images in the first .swf file so I can check _currentframe against _totalframes to determine when he is finished playing so that I can load another.

    Most of the stuff I see indicate that _totalframes on an external .swf can be determined by loading the .swf in a container clip and then check using a listener in the .onLoadInit. Like this:

    ------------------------------------------------------------------------------------------ ----------------------------

    this.createEmptyMovieClip ("tester_mc", 1);
    var mcListener:Object = new Object();

    mcListener.onLoadInit = {function (target_mc:MovieClip)}
    target_mc.onEnterFrame = function() {}
    If (this ._currentframe > = this ._totalframes) {}
    trace ("total frames =" + this ._totalframes);
    delete this.onEnterFrame;
    } else {}
    trace (target_mc._currentframe + "OF" + target_mc._totalframes);
    }
    }
    }

    var test_mc:MovieClipLoader = new MovieClipLoader();
    test_mc. AddListener (mcListener);
    test_mc.loadClip ("Ad_Group.swf", tester_mc);

    ------------------------------------------------------------------------------------------ -------------------------------------

    Unfortunately, this doesn't seem to work. The trace will always return a total number of frames of 1.

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I would appreciate any ideas on how to raise the total number of frames of an external .swf file or, Alternatively, put it another way when it's done playing. (Not only the loading, but play until the end.)

    TIA,

    C

    I guess it's because the container clip has only 1 frame, and the external .swf timeline seems to be ignored.

    I wouldn't imagine. My guess is that the main scenario for the external swf file has only 1 frame and the rest of the animation is inside a movieclip in this timeline. You publish this swf? Can you open the FLA and check how many images is open on the main timeline?

    The approach that you have mentioned is about what there is. But he knows check a chronology. If there are many nested movieclips, it may be impossible to understand what timeline you really want to be 'THE' full chronology.

    If you have the FLA, you can have the video call function on the _root timeline which tells the main swf that has completed a movieclip or something like that.

    Also, I have in my head somewhere that I recently saw something that someone made similar to this one, but do not remember... If it appears in my head that I will post.

  • IR - CubeQuery - no limit to the maximum number of columns or lines?

    In IR query processing cube, is there a limit to the maximum number of columns or lines? If so, how?

    When downloading of the results, are there limits to the maximum. lol the columns or lines as well?

    All documentation on its limits?

    Please help someone?

    Columns cannot be more than 256 upto Hyperion Interactive Reporting Studio 9.2.

    No, there is no limit to the maximum number of rows. It depends on the memory and available space on your machine.

    Please correct me if I'm wrong.

    I hope this helps.

    Kind regards

    Manmohan Sharma

  • How to display the total number of rows in the dashboard

    Hello

    I have a dashboard report for retrieving the list of projects and details, it grows on a daily basis, instead of users downloading the report and find out the total number of projects, I want to display 'the total number of projects' alone in the dashboard. How can I do?

    Also is it possible to do like a pop up or something a little flash news - not necessary, but will be very good if I can do it.

    Thanks for your time and your help.

    create a report and a column to write a column invert the function max (rcount (1)). Call this column depending on the position of the column (as @1) in narrative mode.
    You can view only the narrative in the dashboard.

    for flash type of report, you can use the ticker view and call the same column in the view.

    refer to this link to view the total number of records
    http://Siebel.ITtoolbox.com/groups/technical-functional/Siebel-Analytics-l/display-row-count-in-top-of-the-table-view-3704999

    assign points if found useful.

  • How can I know the number of columns and lines on excel file

    How reading the number of columns and rows on an excel file after you open the file in excel with ActiveX.

    Using the example of excel200dem, I read that the file data is excellent.

    However, in this example, I just give the number of lines and columns.

    I want to know the number of lines and columns not giving those in C code automatically.

    Who knows this things? -?

    Help me please.

    Hello

    (1) this forum provides a search option, you must use in doing so, you will find this post

    (2) don't solve you your earlier questions? If so, you must mark responses that have helped you find a solution.

  • How to get the Total number of nodes XML?

    Hi all

    I have a Flash program that I do in Actionscript 3, using CS6.

    I use the XMLSocket class to read XML data. I'll write some examples of XML that is sent to the Flash

    program below...

    I know with this line here (below) I can access the 4th 'element or node' of XML data.

    To access the XML nodes/elements:

    * I created a Variable XML, called xml, and "e.data" contains ALL the XML data
    var XML = XML (e.data);

    Access to the 4th item of the data:

    . xml MESSAGE[3].@VAR;          -> 'loggedOutUsers '.

    . xml MESSAGE[3].@TEXT;         --->     "15"

    EXAMPLE OF XML DATA:


    < FRAME >

    0 < VAR MESSAGE = "screen2Display" TEXT = "FRAME_1" / >

    1 < VAR MESSAGE = "numUsers" TEXT = "27" / >

    2 < VAR MESSAGE = "loggedInUsers" TEXT = "12" / >

    3 < VAR MESSAGE = "loggedOutUsers" TEXT = "15" / >

    4 < VAR MESSAGE = "admins" TEXT = "2" / >

    < / FRAMEWORK >

    I'm new to Flash and Actionscript but I am very familiar with other languages and how paintings and other work, and I know for

    example, in a Shell Script to get the total number of items in an array called 'myArray' I wanted to write something like

    This-> ${#myArray [@]}. And since the data processing XML looks a lot like a table I thought that there was perhaps

    a way to access the total number of "nodes or elements" in the XML data...?

    Any thoughts would be much appreciated!

    Thanks in advance,

    Matt

    even if you don't need to run to the loop to know the length

    var levelList: XMLList = xml.children ();

    levelList.length (); This will give you the length of all children in your case of length MESSAGE of nodes;

    Pls click useful if my answer is helpful.

    Thank you

    Bala

  • How to get the total number of pages have been printed using the pl/sql

    Dear all,

    I want to store the total number of physical pages printed in a database table, how could retrieve the value of the total number of pages.


    I am using Oracle 6i report

    thnxxx in advance :)

    At the end of your report (i.e. After all the images from your data model), place a dummy field. You can get the page number with srw.get_page_num in the trigger of the format of this field. Since it is the last field of your report, it is also the last page number.

  • How to display the total number of text entries in a table (php)?

    Hello

    I have a database of 'chorus' with 'members' table that has the following data structure:

    Name Voix
    Jennasoprano
    DannaAlto
    ROXYAlto
    Damientenor
    CarmenAlto
    Daisysoprano

    Diana

    Alto
    Roberttenor
    JohnBass

    With Dreamweaver, php, any help on how display in a Web page the total number of 'alto', in this case: 4.

    Thank you

    Luci.

    SELECT voice, COUNT (*) as the GROUP BY, ORDER BY DESC voice voice FROM choir;

    This will give you the plain voiceid - County

    SELECT voice, COUNT (*) as the chorus of voices ORDER BY DESC GROUP name;

    This will give you appoint County - voice -.

    Confidence, it helps.

    See you soon,.

    ST

  • How to track the total number of downloads of my app BB10

    Hello

    I'm not sure of this is the right section to post in, but it's the best I could find.

    I want to track the total number of downloads of my BB10 APP on the blackberry world. Download report is very simplistic and just generates a chart leaving me count manually. I tried also to export the data to download to Excel. While this works, it is a bit heavy. Is there another way for me to be able to view these data easily right now? Or do we have to wait for the SDK analytical tool to be made available for BB10?

    Thank you

    Take a look at this that maybe that's what you're looking for...

    http://www.appworldreport.com/

  • How to get the total number of frames

    Hai...

    I need this code...

    I have n number of files (swf) flash. Each file contains a number of images. I need to get the totalframes of this flash in Actionscript 3.0 files.

    Please help me through Actionscript.

    You can use a movieclip totalFrames property to get the total number of frames for a timeline.

  • How to get the total number of pages

    Is there anyone know how to get the total page after generate us the pdf file. I use the remainder method and create an external process. ?

    In the workbench, I use a SetValue

    Until you assemble the document that you need to build the DDX string and specify the xml information.

    Concat (/process_data/@ddxHeadStr, " ")

    AFTER mounting

    Use SetValue that set your xmlinfo variable (xml type)

    xmlInfo/process_data/game FOR

    / process_data/assemblerResult/Object/documents[@id]

    [ ='doc_info.xml']

    Then get your pages from the XMLinfo

    /process_data/@NUMPAGES

    =

    / process_data/xmlInfo/docinfo/NUMPAGES

    I hope this helps.  Send an e-mail if it is not explicit.  I had to fight over there recently and feel that the documentation really lacks.

  • How to count the total number of records with distinction?

    Hello guys

    I have a report that contains a list of the types of company and other attributes as follows:
    Shipto               Company Type             GC Code               Measures
    A                         cc                             x                          100
                                                               y                          200
                                                               c                          120
    
    B                         YUT                         I                            200
                                cc                           U                           98
    
    G                         Maid                        rt                           200
                               YUT                        TT                         300
                               JTE                         TY                         400
    
                               
     
    The list goes on and... "Business type" appears is not the highest or the lowest... I would like to see what is the total number of different company types we have. By this report, there should be 5, but if I count or count (*) or rcompte, I actually get the total number of lines in the present report, which is not what I want...

    If someone could help me to find the total number of company types?

    Thanks in advance

    Have you tried this one?

    Sum (Count (distinct ColumnName))

  • How to find the total number of queries from the awr report

    Hi all

    Is it possible to find on the total number of queries fired on the database of an AWR report.

    No, it means that there are 26,459,500 executions and captured SQLs accounts 93.9% of total executions, i.e. the 24 845 execs 470.5.

Maybe you are looking for