MS WORD TABLE commands such as "AutoFit to contents" can be achieved in LabVIEW report generation?

LV 7.1 and Report Generation Toolkit 1.1.
I generate a report by the tookit.But tables are in disorder because of the different contents in cells.
Is there a way(or any function) in LabVIEW to made it like "AutoFit to contents" or "AutoFit to window" in WORD.
Thanks
=======================
Windows XP SP2+LabVIEW 7.1
Attachments:
Report.vi ‏98 KB

Where is this VI that you say to take the "Data" output from located?  I can not find it on the Palette.
I need to do the same thing to a word report I am creating, autofit the tables to contents (except certain ones) and need to know how to access that property.
EDIT - Nevermind - I found it.
http://digital.ni.com/public.nsf/allkb/dc08b6a56dbe00a586256f1d006826dc
Thanks,
Ryan
Message Edited by RVallieu on 04-26-2006 04:14 PM
Ryan Vallieu
Automation System Architect

Similar Messages

  • How to obtain the table index in word use LabVIEW Report Generation Toolkit for Microsoft Office

    I created a word templete and it had several tables. When I use the "Word Edit Cell" function in LabVIEW Report Generation Toolkit for Microsoft Office, the function need "table index", and I didn't find any function to get or set the table index in word document. How can I achieve my attention to write value to specified table cell using the "Word Edit Cell" function?
    Thanks for reply!
    YangAfreet

    Hi yangafreet
    You do not need to get the table index for the word edit cell.vi from anywhere. LabVIEW will automatically index all the tables in the document. See the attatched vi for an example.
    Rich
    Attachments:
    Table Edit.vi ‏23 KB

  • How to set tabstops in MS Word using the LabVIEW Report Generation Toolkit

    Using the Report Generation Toolkit of LabVIEW, I need to set multiple tabstops that very in distance in MS Word.  I also have different sets of tabstops that I use and re-use at different times in the same report.  Is there a way to set the tabstops under program control?  I searched through the various VIs and found that there is a property ("Tabstops", "Word.Tabstops") in the _ParagraphFormat property node that refers to tabstops.  I found it in the Word Format Paragraph (adv) VI.  Unfortunately, I could not determine how to use it.  Any suggestions?  Is this an operational element?

    Bluebell,
    Sounds like you've already done some fantastic work to expose the various properties and methods of MS Word. It took me about 20 min before I could find the specific property that you were talking about! I found it under Word.Document>>Paragraphs>>Tabstops>>Add. There is a position, alignment and leader parameter that you can set from this property node. I've found that the best way to discover what these parameters do is to simply experiment. You could also try using the macro recorder in Word, perform the specific task, and then look at the code generated. I'm guessing that position sets the position of the tabstop itself. It sounds like your application is really specific. For such a specific task, I think I'd write a macro and call that macro from LabVIEW.
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • Saving only a portion of a Microsoft Word template into a new document using LabVIEW Report Generation Toolkit

    I have a Microsoft Word template I want to populate programmatically with test data. The template contains both explanatory text and a data sheet section with test data placeholders (bookmarks). Using the Report Generation Toolkit for Microsoft Office, I have been able to successfully populate the placeholders with data and save the results into a new Microsoft Word document. The problem is the new Word document contains not only the test data but also the explanatory text that was in the original document template. Ideally, I would like to have the generated document contain just the test data without the accompanying text. Is it possible to do this usi
    ng the Report Generation Toolkit?

    Hello Ryan,
    Two easy options come to mind.
    1. You may want to consider using an �ink annotation� instead of regular text for your explanation.
    2. You can programmatically do a find and replace on the explanatory text. Have LabVIEW find the whole paragraph, and replace it with nothing.
    If none of these suggestions help, or if I�m not correctly understanding your issue, please reply with comments or answers to the discussion above and any additional information that may help, and I�ll be happy to look further into it.
    Have a nice day!
    Robert Mortensen
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • Table set to Autofit to Contents doesn't display correctly in RH10

    Upgraded from RH9 to RH10 and all my tables are set to Autofit to Contents.  After upgrading, the first column of every table is huge/wide, therefore, it's very difficult to work with the remaining columns because they're so condensed.  I've been waiting for an answer to this issue for over 2 months from RH support so thought I'd see if anyone else is experiencing the same problem and if so, if they found a resolution.

    I am seeing the same in a new table created from one of the default tables that ships with RoboHelp. Looks like a bug.
    If you use Fit to Window, it works. The choice is to live with the bug or switch to another option.
    You should report the bug.
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to emulate Word tables behaviour in Pages

    I am trying to create a document which has the text of a book in English in the left column of each page and the same text in Japanese in the right column. I want the beginning of each paragraph to align with the beginning of each corresponding paragraph in the other language.
    I was doing this in Word previously, but because I'm in the beta program, Word (2011 beta) starts to freak out with documents over about 300 pages. In Word, I did it by having a 2-column table, using a single row for each chapter. I then used line breaks to align the paragraphs within a chapter.
    Is there any way to get similar functionality in Pages? I tried doing it with a table (by importing the .docx I had been working on) but Pages only shows one row per page, hiding all the text in any row which doesn't fit on a single page. Can I make column rows flow over more than one page?
    I also tried working with text boxes, but they are such a clunky solution and it seems (unless I'm missing a trick) that I'd have to manually put new text boxes in the same position on each page, then manually create the link between each one.
    Many thanks

    Blahah404 wrote:
    As I understand it I can use Applescript to interact with Pages, is this correct? If so, is it possible to write a script which creates a new table row and fills it with content overflowing from the previous row, ad infinitum until all the content is visible in successive rows? It seems strange that there would be no tool available for this functionality.
    You may feel that it's strange.
    What is sure is that there is no such a feature.
    The support of tables in AppleScript is really short :
    just a command allowing us to create a table with a given contents, with or without a header row or/and a header column.
    no provision to rule columns widths, rows heights.
    I built a small script able to extract the contents of a table but at this time, I found no way to edit them.
    tell application "System Events" to set (UI elements enabled) to true
    tell application "Pages"
    activate
    set table_name to "Table 1"
    tell document "Sans titre 3"
    set window_name to name
    set existing_graphics to name of every graphic
    if existing_graphics does not contain table_name then
    add table data {{"Year", "Mac", "iPad"}, ¬
    {2009, 100, 0}, {2010, 200, 220}} with header column and header row
    end if
    -- get properties of every graphic
    set name of graphic 1 to table_name
    end tell -- document
    end tell -- application Pages
    Now we use GUI scripting
    tell application "System Events" to tell application process "Pages"
    tell table table_name of UI element 1 of group 1 of UI element 1 of scroll area 1 of splitter group 1 of window window_name
    -- get every attribute
    get properties of attribute "AXRowCount"
    -- {class:attribute, name:"AXRowCount", value:3, settable:false}
    (* We can get the Row Count but we can't change it *)
    tell first static text of UI element 2 of row 2
    get properties
    get attributes
    get properties of attribute "AXFocused"
    -- {class:attribute, name:"AXFocused", value:false, settable:false}
    (* We can get the value but we can't change it *)
    get properties of attribute "AXEnabled"
    -- {class:attribute, name:"AXEnabled", value:false, settable:false}
    (* We can get the value but we can't change it *)
    get properties of attribute "AXSelectedText"
    -- {class:attribute, name:"AXSelectedText", value:missing value, settable:false}
    (* We can get the value but we can't change it *)
    get properties of attribute "AXSelectedTextRange"
    -- {class:attribute, name:"AXSelectedTextRange", value:missing value, settable:false}
    (* We can get the value but we can't change it *)
    get properties of attribute "AXValue"
    -- {class:attribute, name:"AXValue", value:"100", settable:false}
    (* We can get the value but we can't change it *)
    end tell -- first static…
    end tell -- table…
    end tell
    With such tool, I feel that it's difficult to achieve your goal.
    It's why I responded :
    If this doesn't fit your needs, you must use an other tool.
    Yvan KOENIG (VALLAURIS, France) dimanche 11 juillet 2010 18:03:07

  • How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

    How to vertical select a text in iWord.  Like we do in Mac version of MS Word by Command Option [and selecting]

    m0thr4 wrote:
    I want to make sure all text in my document is a particular font (at least), but Cmd+a only selects any text that is not in a table. There seems to be no way to include text in tables, or even a way to change the format of all text in a particular table (MS Word allows the whole table to be highlighted for example).
    A double click in a cell selects it so you may enter what you wish in it.
    Select the cell A1 then, pressing the shift key, click in the right-bottom cell.
    Doing that you will get every table's cells selected which gives the ability to apply global attributes.
    I've searched the built-in help and found "To select all text in a document, choose Edit > Select All." This does not work as tables are excluded from this selection. If tried some of the other suggestions, such as holding down shift while selecting text in tables, but as soon as I get to the end of the text in one cell, the selection disappears.
    My guess is that some words are missing in the Help. Select All selects all the text … of the text layer.
    We must apply the settings to the text layer, to each text box, to each table.
    Of course, you may _Go to "Provide Pages Feedback" in the "Pages" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'09
    Yvan KOENIG (from FRANCE vendredi 10 octobre 2008 17:16:06)

  • Labview 2013 report generation toolkit word 2010 insert table problem

    Hi,
    I am currently evaluating LV2013 with respect to the report generation toolkit for use with word 2010. My Vi/program won't insert the correct table and gives me an error message. see below:-
    Exception occured in Microsoft Word: The requested member of the collection does not exist.Help Path is wdmain11.chm and context 25421 in NI_ReportGenerationToolkit.lvlib:Word_Insert_Table​.vi->NI_Word.lvclass:Append Text Table to Report.vi->Word Table save.vi
    I have since run the following word example.vi provided by NI within LV2013 office examples:- Growable table.vi. this gives me the same error!
    Exception occured in Microsoft Word: The requested member of the collection does not exist.Help Path is wdmain11.chm and context 25421 in NI_ReportGenerationToolkit.lvlib:Word_Insert_Table​.vi->NI_Word.lvclass:Append Text Table to Report.vi->Growable table.vi
    It would seem that regardless of my own Vi there is a fundamental problem in the office example vi.
    I have found examples of a similar problem in LV2011/2012 but the work around code doesn't seem to match the LV2013 vi's code for a direct replacement.
    Can anyone help/shed some light on this? 
    Thanks in advance,
    Dan.

    Because the upgrade of Word from 2007 to 2010 I needed to upgrade an existing application from LabVIEW 2009 to 2013. This didn't work because of the insert table error. I discovered that the problem is the vi called "Word_Insert_Table.vi" located in the ..Program Files (x86)\National Instruments\LabVIEW 2013\vi.lib\addons\_office\_wordsub.llb. There is a "Cut" command implemented, this command removes the created cell instead of clearing it. Therefore the table will be filled half and then returnes with an error. I have removed this command. I have posted the changed vi (LV 2013).
    Attachments:
    Word_Insert_Table.vi ‏30 KB

  • Can Word TABLES be posted onto iWeb

    I am a rookie! at using Webs and need help please.
    I want to use iWeb to provide a Table of Members and their interests to a Group I belong to. The table of members is 7 columns and 80 rows.
    I have tried the templates (the blank one first!) and have cut and pasted the word table in.
    BUT only the first "page" of the table gets placed on iWeb.
    Am I doing something wrong. or is iWeb not designed to take tables.

    Back again Kyn having read and tried.
    Chastened for not having thought of increasing the size of the page (for that just HAS to be pertinent), I read up and duly made the width and height generously large and opened one of the templates.
    Then I pasted the table, but it posted NOT the table, but the contents of it down a left hand column (name: with details for that name listed below then next name etc).
    So I then opened a blank page and stretched it similarly, and again copied and pasted the table.
    This time a different result! An image of the first page only of the table appeared on the iWeb page. And I was back to the original problem.
    I need to ask how to get the full table up and posted in such a way that my co-members can view it all and then cut and paste it.
    Am I being over ambitious?
    Cheers
    Trevor

  • Report Generation Toolkit: Table of Contents in MS Word

    Hello forum users,
    I would like to add a table of contents to a MS Word document, using the Report Generation Toolkit.
    I couldn't find a VI in the toolkit that does that, so I tried to modify the VI "Word Insert Field.vi". Doing so, I could access a property node of the class "Word._Document"  and an invoke node of the class "Word.TablesOfContents" with the method "Add".
    As this modified VI does not belong to the private LabVIEW class "NI_Word.lvclass", it is not possible to unbundle the (type cast) "report in" wire to get the "Word._Document" class reference. I can't add the modified VI to the NI_Word class either, because it is password protected.
    There are so many methods and properties that are not used in the official Report Generation Toolkit, like this one. How can I access them?
    Or maybe there is another way to add a table of contents to a MS Word document (programmatically). Maybe I have to use a template. I rather wouldn't, though.
    Operating System: Windows 7 64bit
    LabVIEW: 2009 [9.0 (32bit)]
    Report Generation Toolkit: 2009
    MS Office: 2003 SP1
    Thank you for reading an answering.
    Solved!
    Go to Solution.
    Attachments:
    Word_Insert_TOC.png ‏68 KB

    Hello again,
    in the "Word Specific" > "Word Advanced" Palette of the Report Generation Toolkit, there is a VI called "Word Get ActiveX References" which essentially unbundles the private "report" data stream / wire. Thus, I can use the property and invoke nodes that make use of the "Add TablesOfContents" method.
    I hope, that helps other users as I didn't find too many topics on Report Generation. Maybe it's just too easy...
    Attachments:
    Word_Insert_TOC_fix.png ‏60 KB

  • Report Generation Toolkit Table Row Height-MS Word

    I am having trouble setting the table row height in the report generation toolkit. I can set the column width fine, but the row height seems to remain the same no matter what I set it to. I have attached the VI that generates and formats the table, and the printout it is resulting in. I have also attached the template file I am using.
    Any tips to get this to work right? I am trying to make the cells exactly the same height as the text inside. 
    Solved!
    Go to Solution.
    Attachments:
    AddMarkersToReport.vi ‏20 KB
    badFormatting.pdf ‏179 KB
    splitter.docx ‏13 KB

    Hi,
    So I tried .2  and it didn't work.  So I went to Word to manually change it, and it did not work either.  There is a selection box in word, for the table properties, that seems to default to the value "at least".  When I changed this manually to "exactly" in word, no problem with the .2 manually in Word.
    Hopefully this can be set within the template, for all new inserted tables.  I'm not sure the report generator VI's expose this property.  Well, this is a start for the issue.
    Edit ****
    You can go into the add table VI and expose the property.  See pic.   However, you have to decide if you want to "upgrade" this VI permanently to expose this property or make a copy with the property exposed.   I haven't messed with the new class reports too much, so not sure of the ins and outs with this.
    I think this is the issue with the row size becoming smaller.
    Mark Ramsdale

  • Report Generation MS Word Table Bug

    Hi everybody,
    I am using Word 2010 and LV2010 and I am unable create a proper table with Word using the Report Generation Toolkit. Excel and HTML work fine, but Word fails. Not even the Examples work as they are supposed to.
    When using the attached VI (see screenshot below)
    the result appears as follows:
    Temperature
    Temperature
    Temperature
    Temperature
    Temperature
    Data 1
    Data 1
    Data 1
    Data 1
    Data 1
    Data 2
    Data 2
    Data 2
    Data 2
    Data 2
    Does anyone have an idea?
    Thanks in advance.
    ben
    Solved!
    Go to Solution.
    Attachments:
    test_table.vi ‏10 KB

    OK, if NI won't provide a workaround, I'll create my own:
    The problem stems from the fact that the NI Report Toolkit populate a Word table by first creating an empty table of the correct size, then placing the table contents into the copy buffer, then selects the whole table and uses Paste to push the data into the table. The problem is actually in Word, because in Word 2010 it interprets the contents of the copy buffer differently.
    The solution is to alter the data that gets pushed into the copy buffer by the NI Report Toolkit. To implement my fix, you will need to alter one VI of the NI Report Toolkit (so you might want to make a backup in case this stops it from working in other previous release of Word).
    Open [LabVIEW installation folder]\vi.lib\addons\_office\_wordsub.llb\Word_In​sert_Table.vi
    There is a nested for loop that interprets the provided string array data and reformats it into a long ASCII string for the copy buffer. It should look like this:
    Change the nested loop to look like this:
    The changes I've made are twofold:
    1. Within the inner loop, replace the "\n" char with a Tab character
    2. Just after the inner loop, add a new "concatenate strings" function that adds "\n".
    This alters the string that the toolkit places into the copy buffer. You should find that report tables now populate correctly in Word 2010!
    This is untested on previous releases of Word, and could possible introduce problems there, so if anyone could test this for me it would be most appreciated
    Best of luck!
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Inserting an image into a Word Table with the Report Generation Toolkit.

    I was wondering if it was possibe to use the Report Generation Toolkit to place an image into the cell of a table in a Word document?
    Solved!
    Go to Solution.

    Hi,
    Yes, you can do this by using the Word Edit Cell VI under Report Generation>>Word Specific>>Word Tables in your block diagram functions pallette.  After creating a table, you can edit specific cells and send the file path of the image saved on your computer to that specific cell.  I put together an example that I've attached here as well to help you out with this.
    Regards,
    Austin S.
    National Instruments
    Academic Field Engineer
    Attachments:
    RGTWordImageInTable.vi ‏14 KB

  • Report Generation: linebreak text in Word table row

    Hello everybody.
    Im trying to add some pretty tables to my Word report created with the Report Generation Toolkit.
    I build my 2d string array with the table data and that works fine. But if I add a text to the array cell that has a linebreak constant it breaks the table. I.e my strings is not in the right place and some are missing in the table if linebreaks exists in the strings in the 2d string array that I feed to the 'Word Easy Table' VI. Se my lw 7.1 example below.
    Any one have an ide how to solve this?
    Attachments:
    WordTable-LinebreakProblem.vi ‏82 KB

    Paul,
    You last response got me think about the complex nested grouping of my for loops that are surrounding and embedded in my table(s). I analyzed my groupings and found that two of my levels had similiar values. When I moved those groupings outside my table, the 3 TOC entries FINALLY appeared !!! Newbie error!!! Anyway, the only problem left to resolve is the page number is not generating with the TOC entries (Getting Bookmark Not Defined Problem). I am wondering if this is a context problem ...or still part of a looping problem. I also can't seem to get the table headers to replicate on page breaks in RTF mode. They do work in PDF generation mode. It is sort of difficult to pass info because I nature of the info I am working with. Thanks for your time and patience. I have learned alot just trying to get this complex template to work.
    Thanks,
    Tom

  • Data from word tables to excel master spreadsheet

    Hello, I'm looking to take data from my damage report forms that come in maybe 20 times a week. This data needs to goto a master excel spreadsheet. I've managed to find a macro that does this but it does not paste it into excel the way I require and also
    extracts data I do not require.
    The word document contains a column of headings on the left, these will be the master spreadsheet sheet column headers. These will be on the spreadsheet already so I don't need them copied. 
    The other  two columns contains the data I will need to xfer to excel. I was thinking bookmarks can help here but I'm unsure if these will save over from the original template?
    So,  if there is some code out there that can help, brilliant. It will be an excel macro in the master spreadshee. TThat takestthe datadfrom the active word doc or by selecting the word doc in its folder. 
    Fingers crossed.
    Joseph 

    Hi Joseph,
    You should be able to run below code to get the data out of the Tabel(s) of a Word Document from within Excel.
    You can modify the code accordingly to your needs to specify the range where you want the data to be copied.
    I have already slightly modified the code to skip the header information.
    Sub ImportWordTable()
    Dim wdDoc As Object
    Dim wdFileName As Variant
    Dim TableNo As Integer 'table number in Word
    Dim iRow As Long 'row index in Excel
    Dim iCol As Integer 'column index in Excel
    wdFileName = Application.GetOpenFilename("Word files (*.docx),*.docx", , _
    "Browse for file containing table to be imported")
    If wdFileName = False Then Exit Sub '(user cancelled import file browser)
    Set wdDoc = GetObject(wdFileName) 'open Word file
    With wdDoc
    TableNo = wdDoc.tables.Count
    If TableNo = 0 Then
    MsgBox "This document contains no tables", _
    vbExclamation, "Import Word Table"
    ElseIf TableNo > 1 Then
    TableNo = InputBox("This Word document contains " & TableNo & " tables." & vbCrLf & _
    "Enter table number of table to import", "Import Word Table", "1")
    End If
    With .tables(TableNo)
    'copy cell contents from Word table cells to Excel cells
    ' start with row 2 to skip headers
    For iRow = 2 To .Rows.Count
    For iCol = 1 To .Columns.Count
    ' Define starting point here
    Cells(iRow - 1, iCol) = WorksheetFunction.Clean(.cell(iRow, iCol).Range.Text)
    Next iCol
    Next iRow
    End With
    End With
    Set wdDoc = Nothing
    End Sub
    The source is this link:
    Export Word Table in Excel
    Also this Forum is more for generic Excel questions, for better response post in Excel For Developer Forum.
    Hope this helps,
    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

Maybe you are looking for

  • Mail keeps crashing on iPhone 5 / rapid battery depletion

    Hi, Up until now my iphone 5 has worked perfectly. Now, when I try to open the mail app it crashes; it tries to open it for a second or so and then goes back to the main screen. I have read some threads that suggest removing Gmail; unfortunately when

  • Satellite A135-S2276 - can't find drivers for Windows XP

    Hi! I can't find drivers for windows XP to this notebook. Do anyone know where I can find it?

  • Issue when running acutal Off-cycle payroll in India!

    Dear experts! I have an urgent issue when running ACTUAL off-cycle payroll in India as below: "Payroll already performed once in future". In testing mode, everything is fine. I have tried to check payroll result in pc_payresult and pu01, and Infotype

  • Z-Index

    Is there a type of z-index in flash?

  • Tomcat error: "method not found"

    I'm starting a new thread because the issue is method not found. So kindly bear with me. I'm using Tomcat 5 with Javac 1.4.2. I have created a test class called hellothere. The idea is to call a method from JSP. package helloworld; import java.lang.*