Help to import the data from the catalog to a text file (csv import, delimited by tabs, excel)

Hi All-

I was hitting my head on this one for a few days now. It seems that something that has probably been done before and should not be so difficult, but I found few cases of help in the documentation from Adobe (and researched a lot of google).

I have a catalog of retail sale of 100 pages with approximately 1000 products in InDesign CS5. I have a spreadsheet excel with the names of products this year, prices and descriptions of update. Normally, we would go through one by one and cut and paste. This year, I thought I would try to skip this step. There are plugins that do this, but they are not cheap, and we are not big. Upgrade to CS5 of CS2 is a big investment in and of itself.

ssp_temp_capture.jpg

Here is an example of the data (I use a vertical bar as a separator character):

28392779 | 3627 | Super top | Get a handle on the pleasure. Wrap the cord around the axis and s '. | 6½ "long
| $10

Then... standard excel file exported to a delimited format (I use OpenOffice to export in order to avoid the problem of excel citing darn close * everything *). In the InDesign file, we have a component of text for grouped each name, description, and price. The Group has a title of the product ID script and each field within the group is labelled accordingly (name, id, description). Thus, the Group: 3627, point: description (name or price).

Pseudocode:

Open the file

Analyze the data in a table

Scroll through the InDesign file group

Check the script group label, look it up in the table, assign values to the fields

Easy right?

I'm not new to javascript, but it is not my tongue harder. With this effort, I had problems as simple as the syntax for the identification of the groups by their label. Anyway, here is the code (it is not pretty as the only way that I could not even run to scroll the table of data line by line and then scroll the entire InDesign file for each row of data. And, Yes, it takes about an hour to run--but it * is * run):

myDocument var = app.activeDocument;

data var file = File("/Users/reddfoxx/Desktop/2010Sept8CatDesc.csv");
DataFile.Open ("r");

data var = datafile.read)

data = data.split("\n");


the data array is indexed from 0
field 0 is the internal ID
field 1 is the product ID
field 2 is the name of the product
zone 3 is the description
field 4 are the dimensions
zone 5 is the price

for (x = 0; x < data.length; x ++) {}

data [x] = data [x].split("|");


for (var z = 0; z < myDocument.groups.count (); z ++) {}
{If (myDocument.groups.item (z) .label == {data [x] [1])}
myGroup = myDocument.groups.item (z);

for (var y = 0; y < myGroup.textFrames.count (); y ++) {}
If (myGroup.textFrames.item .label (y) == "name")
{
myGroup.textFrames.item (y) .silence = data [x] [2];

}



If (myGroup.textFrames.item (y) .label = 'description')
{
myGroup.textFrames.item (y) .silence = data [x] [3];
}

If (myGroup.textFrames.item .label (y) == 'dimensions')
{
myGroup.textFrames.item (y) .silence = data [x] [4];
}

If (myGroup.textFrames.item (y) .label = 'price')
{
myGroup.textFrames.item (y) .silence = data [x] [5];
}


}
}
}
}

For someone who is not familiar with the groups and scripts, unfortunately, you cannot process blocks of text within a group without using the group. At least, that's what I understand.

Any help would be appreciated. Even just to find how to approach a particular in the document, so that I don't have to scroll through the entire file and do a comparison for each element would be a big improvement.

Thanks in advance.

-Redd

Hey!

You have nice little problem here

Well, unfortunately, InDesign CS5 is a bit heavy on the labels of script, there were some changes and other things. In CS4 and before, when you call pageItem.item (myItemName), you would get called from script, but in CS5, it has been changed, and now you get the element name that is in the layers palette. Now you can easily copy all the script tags, new place, and then it would be easy to access items by name of the element.

This will copy all the labels current script name of the element:

for(var i = 0; i < app.activeDocument.allPageItems.length; i++)
  app.activeDocument.allPageItems[i].name = app.activeDocument.allPageItems[i].label;

Now, when you have all the names in place, you can access them like this:

app.activeDocument.groups.item(data[x][1]).textFrames.item("name").contents = data[x][2];
app.activeDocument.groups.item(data[x][1]).textFrames.item("description").contents = data[x][3];
app.activeDocument.groups.item(data[x][1]).textFrames.item("dimensions").contents = data[x][4];
app.activeDocument.groups.item(data[x][1]).textFrames.item("price").contents = data[x][5];

I hope that helps!

--

tomaxxi

http://indisnip.WordPress.com/

Tags: InDesign

Similar Questions

  • extract data from a table to a text file

    I need to extract data from a table to a text file, I twist my output is the following...

    bash-3. $00 vi tap3roamercosts_20110915144318.txt
    lines of 'tap3roamercosts_20110915144318.txt' 393948, 23464348 characters
    ^ LAFGTD | N | 2011090203000001 | 13242514000064 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    755. 64. 70. 0093794428588 | 0093796234547 | 0 | S2 | E | 412200306902634 | 8. 1. 61500 | 16081 |
    | HW | Call to the Roamer. 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | LKA | N_I_Independent
    the time of day. Rate of Roamer SMST systems | AFGTD20110902030000010001013242514000064 |
    |||||||||||||||||||||

    AFGTD | N | 2011090203000001 | 13242612000044 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 44. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000044 |
    ||||||||

    AFGTD | N | 2011090203000001 | 13242612000047 | 1. 0 | 20. 41220 | 02-SEVEN.-11. 01-SEPT.-11. 0 | 13244
    853. 47. 70. 234. 0093793252818 | 0 | S2 | E | 412200303198150 | 8. 1. 61000 | 12403 | HW | -Ro
    bitter call | 0 | I have | Roaming billing Inroamer Plan | 1_0_1 | N_I_Independent time of Da
    There | Rate of Roamer SMST systems | AFGTD20110902030000010001013242612000047 |
    ||||||||
    .
    .
    .
    .
    .

    Please help me how to format my output each record in simple lines in oracle sqlplus. Here are the settings I used...

    TERMOUT OFF SET;
    SET ECHO OFF;
    SET LINESIZE 100000;
    THE VALUE OF NEWPAGE 0;
    SET SPACE 0;
    SET PAGESIZE 50000;
    SET FEEDBACK OFF;
    SET THE OFF POSITION;
    SET TRIMSPOOL
    SET THE TAB

    And what was wrong with the answers that you have on your previous thread?

    How to extract data in a text file

    Please do not ask the same question again. If there is a problem with the answers provided, then continue on the same thread that tell people what is the problem.

    Saying that, this is another possibility for you...

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

    Adapt to the exit of styles and different types of data are needed.

  • How to concatenate strings with the lines of a text file

    Hello
    I tried concatenate strings with the lines of a text file, but something is wrong with my code and I belive is the agruments I use in the cycle for. If anyone can help me I will appreciate it very much.
    My code is:
    [code]@echo off
    the value "input=C:\Users\123\Desktop\List.txt".
    for /f "usebackq tokens = *" % in (' input % ') do)
    the value 'str1 = C:\some directory\ ".
    the value ' str2 = %% ~ F '.
    the value "str3 = .pdf".
    the value "str4 = str1% str2% str3%.
    echo.%STR4%
    ) [/ code]
    and the text file is something like:
    121122 [code]
    122233
    123344
    124455 [/ code]
    But I get only one wrong answer and I have to run it like 3 times to get a real result and it is a mistake, the first two are empty spaces and gives the third one as the last line of the text file but repeated n times, where n is the number of lines in the text file.
    Result:
    [code] C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\Users\123\Desktop>[/code]
    So if anyone has an idea about what is wrong please let me know.
    Concerning
    -Victor-

    Hi Victor,

    This forum is dedicated to the support of the Office of consumer Windows (fonts, colors, personal settings).  Since your question is about programming and usually outside the context of most of the customers, I suggest you post your question in the forums as http://msdn.microsoft.com - the Microsoft network to users will be more adapted to help you in your quest.
  • How can I increase the size of the line when the queue to a text file

    How can I increase the size of the line when the queue to a text file, so that explain plans do not end all crushed togeather...?

    SQL > SET LINESIZE 999

  • Import the catalog - only images not file folders

    On the road, I make a temporary LR catalog and store the images in subfolders (e.g. particular State Park etc.).  When I get home I want to import images into specific folders in my archive main.  Some of the files already exist, or can I not want to use a different name, I don't want to create additional subfolders.  How can I me LR to only import images to the location I specified?

    LR seems always to import folder encompassing also as new subfolders contained in the location you choose in the importation of the Catalog dialog box.

    When you import pictures from the trip catalog, you do a generic import or a "catalog import"?

    If you perform an import of generic, you may need to copy the directory tree of your images using the Explorer/Finder, and then perform an import 'Add '.

    If the 'import from catalog', you may need to look at the file manages the settings in there.

  • Deploy multiple virtual machines from one model to the help of customization of the OS and a text file for hostname and IP

    Hi all

    Not sure if this has already been answered, I did a search on the forums, but couldn't find an answer to what I'm looking for.

    I want to fully automate the deployment of multiple VMs of a model using a customization file, but also to retrieve the host names and IP addresses from a text file / spreadsheet.

    for example:

    I need to deploy a test environment of 30 virtual machines using the template file and customizing TestVM. I have a spreadsheet with the VM host names and IP addresses. The process now is to manually enter the host name and IP when the customization file invites to do while deploying them in each virtual machine. The customization file takes care of the rest (license key, admin password, add to the domain etc.) can I automate entry of the name of host and IP addresses in reading from a text file?

    Thanks in advance!

    Take a look on the deployment, customization and modification of virtual machines to a csv file

    There are many more examples of this community on the same subject,

  • Updated to 2.6 help cannot open the catalog

    I can't open my master catalog after upgrade of LR 2.6 yesterday.  I did the upgrade and was using the

    new program just dandy however after a computer restart I couldn't LR to boot at all.  When I went in the record folder and clicked on my most recent save I get nothing.  When I try an other old file that I receive is not writable and cannot be opened. When I return to a really simple file I can get the open LR but then it won't go to a most recent catalog.  I'm the kind of panicing here.

    Windows 7 32 bit

    LR 2.6

    See you soon

    Brendan

    lrcat. Lock

    The first file to indicate that the LR (lrcat) catalog is locked, which means being used by an instance of execution of LR and therefore cannot be changed by another instance of LR, until the first unlocks it for use by others.

    lrcat. Journal

    This is the log file of the catalogue. A log file is kind of what you think of the history - all the changes that have occurred since the last time that these changes have been written in the catalogue.

    It is a little bare on technical details, but should give you the idea.

    A lot of programs that use a database works this way.

  • How to merge data from one catalog to another users properly?

    Hi gurus,

    Here's the scenario that we have right now and would appreciate any guidance:

    Several months ago in our Test of 11 g server, we have updated our catalog production of 10 g and 11 g and have been developing and proofreading of dashboards in this Test of 11 g server.

    Now, we are ready to go to production with our changes in 11g. What is the proper way to merge the catalog so that in the end, I'll have a catalogue of Production 11 g with my updated dashboards updated 11g, but we have personal content to users of 10 g?

    Specifically, my question/concerns are:

    1 - can I use 11g server catalog as a Test base and then move the copy and the current catalog of 10 g and paste the folder/root/users in 11 g server catalog by using Catalog Manager Test?

    or

    Should I use the catalog of improved production 10 g as basic and then copy and paste into the/root/shared folder from the catalog server Test 11 g using Catalog manager?

    2. what system/root/folder? Can I keep the 10 g/system upgraded or folder / 11 g test system?

    Thanks for your help.

    Hi user,

    This approach,

    1. upgrade of the existing catalogue of prod to 11 g

    2. open the test catalog in Catalog Manager

    3. Select the folder that has the new reports, goto file-> archive and save the file to archive

    4. open the catalogue prod upgraded, select the folder-> file-> Unarchive and select the archived file

    5 deploy this catalogue to the dev or test environment and verify the changes.

    Kind regards
    DpKa

  • Help: How to transfer data from one form to another form form

    Hello:

    I was wondering how / if it is possible to transfer data from form from one form to another form. I create a flow of forms, which are as follows: form of Incident report-> form of risk analysis-> error-> report form decision support survey Standard-> report form of risk control-> form of mitigation-> etc... You get the gist. It would be very time-consuming to constantly transfer the standard who, what, when, where and how from one form to the other. I was wondering how do? I have looked around on the net and this forum and couldn't find a tutorial or a guide? Is this possible with Adobe forms?

    I use a XML schema for the form to preload a list of employees and the standard list information and then publish the form to submit in PDF format for opening and tracking form mobile device. I notice that I can export the data in a form that is distributed in XML but I can't import in a distributed form. I'm a newb with code, but may contain a little of my own.

    An example of how to achieve this with a field name or something would be greatly appreciated! If you need anything, or a copy of the forms let me know!

    Thank you kindly,

    Al

    Hi Al,.

    I have here an example where the data in a single form are 'communicated' to other forms. Please note that there are specific script in each of the forms. It's a work in progress and one day I'll come back make a more polished example: http://assure.ly/qQivbm.

    See also John Brinkman's blog for a different approach: http://blogs.adobe.com/formfeed/2010/07/shared_data_in_packages_part_1.html and http://blogs.adobe.com/formfeed/2010/07/shared_data_in_packages_part_2.html.

    Good luck

    Niall

  • The Catalog backup and no files PSE8

    Following a blackout and the corruption of my catalog, I really want to save the catalog but as I already hold at least 2 copies of each of the 17 000 photos I really don't want another copy, just a way to protect and allow me to easily restore the catalog.

    Can someone help me understand how do (where the catalogue is actually stored)?

    Note Im not happy, I never had problems with PSE4 but 8 makes me mad its so slooooow

    You can find a copy of the catalog folder via help > system information.   Make sure that you back up the entire folder.

    but 8 makes me crazy its slooooow so

    What special operations are slow?

  • Export the registry to a text file

    Hello community

    We have created different variables in registry for various rules, for example, we have our own rule of "Ability to fileblah system" which refers to our own registry '_FileSystemCapcacityWarningblah'variable and it contains "custom" for different drives settings, for example, rather than using the default of 90%, drive C:\ fred.company.com has a value of 95% and D:\ has a value of 97% and so on.

    A customer suspects that he will need this custom information to a compliance report so that he can prove that we monitor X-system but Y-system from 90% to 95% etc.

    I found different ways to export the whole registry as an XML file so that it can be imported into another FMS, but not what I'm looking for.

    Is it possible that I can export a variable (or group of variables) in a text or CSV file?  I know that you can export the table of registry values, i.e. my customizations, by clicking on the box at the top of angle (first photo), but it does not show the name of registry variable nor any of the default settings, the customization procedure (second photo):

    In addition, it would be tedious to do each set individually and then explain what each is for

    Is there an easy way to export complete registry settings to a text/CSV file for some variables?  Ideally, for any variable registry that begins with "Blah_".  In this way, we can give our customer a file containing the following information:

    • Name of registry variable
    • Description
    • Global default
    • Type of topology (perhaps not necessary, but can be useful to have)
    • Topology object name
    • Value

    Thank you

    Brian

    Hello

    dumping the whole registry creates something... rather difficult to analyze. If you only for your controlled series of gloom, do not schedule performance (values according to the window) so this should be a good start:

    prefix = "blah"result = ""
    
    rs = server.RegistryService
    
    rs.getAllRegistryVariables().each() { var ->
    
      if (var.getName().startsWith(prefix)) {    global = var.getGlobalDefault()?.getDefaultValue()    if (!global ) global = ""    result += var.getName() + "(" + var.getComment() + ")" + "\n"    result += " + global default = " + global  + "\n"
    
        var.getRegistryValues().each() { val ->      if (val instanceof com.quest.nitro.service.sl.interfaces.registry.TopologyObjectRegistryValueInterface) {        result += " + " + val.getDisplayableName() + "(" + val.getTopologyType() + ")" + " = " + val.getDefaultValue() + "\n"      }    }  }
    
    }
    
    result
    

    It runs in the editor script or through fglcmd, export what you are looking for I think. See also your info api SL of the local server.

    Hope that helps
    Nils

  • How to find the largest number of text file

    I use the "Read from the text file" block to read the data in my .txt file in labview.  It is now in the string format.  I have a lot of numbers in the file.

    For example:

    0.45

    0.35

    0.12

    1,354

    1.56

    2.89

    5.89

    0.56

    That's what might look like a text file.  I want to find out which of these numbers is larger and do calculations with this number.  I have problems with channels/number/berries formats, etc.  Thank you

    Try to read that the file with File.vi reading worksheet with transposes the True value. Then use the table Max & Min to get the biggest number in the table.

    Lynn

  • First character left in file by reading the first line in text file

    When you use the function of reading text from a file file, I noticed that the 1st character is left in the file. I read the line correctly.

    When adding a 2nd line this character is in the file.

    Part vi code is attached.

    Any ideas?

    Thank you.

    Elik

    Can you attach a file of real data and tell us what you mean by "first character". The number of characters per line do you have?

    Can you tell us what you see in the modified file and what you expect to see.

    Everything seems good.

    1. Read you the first line and so the file pointer is just after the first line
    2. You set the size of the file at the end (seems unnecessary, because it does nothing). The file pointer is always right after the first line.
    3. You write the first line you read concatenated with a second line. It will be written on the current file pointer, i.e. after the existing line
    4. The first line is in the file twice, as planned.

    Setting the file size to the 'end' on an existing file does not have something useful. If you want to set the position of the file instead?

    Try to set the file position from and new data will be written at the beginning of the file.

  • How to export data from $esxcli.nmp.satp.list () to a CSV file

    Hello world

    I am new to scripting. I created a script that will display the data for each host in a cluster to the powercli screen.

    SE connect-VIServer (name of the vCenter server)

    Foreach ($vmhost Get-cluster "Cluster Name" |) Get-VMHost | Name Sort-Object)

    {

    $esxcli = get-EsxCli - VMHost $vmhost

    Write-host - foregroundcolor green "Server:"$vmhost. "

    $esxcli.storage.nmp.satp.list)

    }

    Disconnect VIServer (name of the vCenter server) - confirm: $false

    I need help to get the data, the script displays an on-screen in a CSV file. Help will be very appreciated.

    Hello

    Welcome to the VMware VMTN communities.

    You were pretty close with your script. There are two things I want to say about it:

    First of all, in PowerShell you do not use parentheses around parameter in the cmdlet or function call as in other programming or scripting languages.

    Second, to use the Get-EsxCli cmdlet you must be connected directly to the host. That's why I introduced a Connect-VIserver inside the loop.

    Here's my solution that writes the output to a file called storage.csv.

    Connect-VIServer "vCenter server name"
    
    Get-Cluster "Cluster Name" |
    Get-VMHost |
    Sort-Object -Property Name |
    ForEach-Object {
      $vmhost = $_
      Write-Host -foregroundcolor green "Server: $($vmhost.Name)"
      Connect-VIServer $vmhost.Name  | Out-Null
      $esxcli = Get-EsxCli -VMHost $vmhost
      $esxcli.storage.nmp.satp.list()
      Disconnect-VIServer $vmhost.Name -Confirm:$false | Out-Null
    } |
    Export-Csv -Path storage.csv -UseCulture -NoTypeInformation 
    
    Disconnect-VIServer "vCenter server name" -Confirm:$false
    

    Please let me know if you have any additional questions.

  • How to export the table to a text file description

    Hi Experts,

    help me please for this question, I need to export table description (metadata) no data in a text file.

    Please help me what to queries of this...


    Thanks in advance...
    Surya

    Hello

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> spool mytable.txt
    SQL> desc t
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
    
     X                                                  NUMBER
    
    SQL> spool off
    

    Best regards
    Nikolai

Maybe you are looking for

  • HP Pavilion p7-1030 graphic card upgrade help

    OK, so I have a desktop HP Pavilion p7-1030, and the graphics card is crap, I need to update something much better.I know that I'll probably need a new power supply too, if anyone knows a good combo? Also, where can I find the old graphics card and P

  • Satellite L50 - Has: Toshiba HDD recovery does not

    I want to drive HARD for Windows 10 recovery, I put all my files on other partitions, I was hoping to see & do "recover without changing the hard drive partitions", but when I turned on my PC and now at 0, it did not open any software TOSHIBA recover

  • How to determine if 64exe or 86exe

    How can I determine if 64 or 86 when updating netframework 2.0

  • Certificate based with chaining of EAP authentication

    Hello world My question is about EAP - TLS and EAP chaining. I know that EAP - TLS is used for certificate based authentication. I think using EAP chaining which employees computer and user authentication. So if you use EAP - TLS with chaining EAP, t

  • How can smartphones blackBerry I delete all my contacts?

    Hi all! I just want to know if it is possible to delete all my contacts (on the phone memory) only once, because delete them one by one is a little annoying... Thank you Val