AVEVA Community
AVEVA Community
  • Site
  • User
  • Site
  • Search
  • User
PDMS/E3D Forum
  • AVEVA World
PDMS/E3D Forum
Macros & Tools Row read
  • Forums
  • Resources
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Replies 15 replies
  • Subscribers 17 subscribers
  • Views 338 views
  • Users 0 members are here
Options
  • Share
  • More
  • Cancel
Related

Row read

Sgar Saha
Sgar Saha over 5 years ago
 
  • Sign in to reply
  • Cancel

Top Replies

  • Sgar Saha
    Sgar Saha over 3 years ago in reply to Aurelio Hinampas +1
    How to append data into existing excel, I have 3 columns. and is there any way to read the last cell value of a column of excel .
  • Sgar Saha
    Sgar Saha over 5 years ago
    Hello all , you have any macro to read the data of excel and fill attributes in CE.

    I have attached a file where each pipe's attributes mentioned in next row . there is no data in row header.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 5 years ago

    You can check the existing thread:
    RE: From Excel file to Selection List 

    Or you can simply copy the excel cells which contains the attributes then Paste as Macro (Ctrl + M) in the Command line

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Sgar Saha
    Sgar Saha over 5 years ago
    Hi. I have already checked that post. Here a name and type is required. In my case i need to read the row data wrt pipe name
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • me_hungry
    me_hungry over 5 years ago
    In that thread check post 5. But you need to add your own code inside do loop.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Matt de los Angeles
    Matt de los Angeles over 4 years ago
    Good day, please help me on how to put or get the rows of excel using pmlobj. Thanks in advance
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Matt de los Angeles
    Matt de los Angeles over 4 years ago
    It's ok now no need to reply.
    • Cancel
    • Vote Up -1 Vote Down
    • Sign in to reply
    • Cancel
  • Aurelio Hinampas
    Aurelio Hinampas over 4 years ago
    Excel (*.xls) data can be read through .Net API, see the sample macro code:

    import 'GridControl'
    handle any
    endhandle
    using namespace 'Aveva.Pdms.Presentation'
    !netDataSource  = object NETDATASOURCE('Excel Data', 'C:\Temp\Source-Data.xls')
    !netGridControl = object NETGRIDCONTROL()
    !netGridControl.bindtodatasource(!netDataSource)

    -- Get all grid column header titles
    !gridColDatas = !netGridControl.getColumns()
    -- Get All Grid Row Datas
    !gridRowDatas = !netGridControl.getRows()

    -- Query column header titles
    q var !gridColDatas

    -- Loop through all row-column contents
    do !rowData values !gridRowDatas
       q var !rowData
    enddo
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Yorick Dantuma
    Yorick Dantuma over 4 years ago
    [QUOTE=rhel;117585]Excel (*.xls) data can be read through .Net API, see the sample macro code:

    import 'GridControl'
    handle any
    endhandle
    using namespace 'Aveva.Pdms.Presentation'
    !netDataSource  = object NETDATASOURCE('Excel Data', 'C:\Temp\Source-Data.xls')
    !netGridControl = object NETGRIDCONTROL()
    !netGridControl.bindtodatasource(!netDataSource)

    -- Get all grid column header titles
    !gridColDatas = !netGridControl.getColumns()
    -- Get All Grid Row Datas
    !gridRowDatas = !netGridControl.getRows()

    -- Query column header titles
    q var !gridColDatas

    -- Loop through all row-column contents
    do !rowData values !gridRowDatas
       q var !rowData
    enddo


    Hey thanks! works fine. only to work in E3D use


    using namespace 'Aveva.Core.Presentation'
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Sgar Saha
    Sgar Saha over 3 years ago in reply to Aurelio Hinampas

    How to append data into existing excel, I have 3 columns.

    and is there any way to read the last cell value of a column of excel .

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Sgar Saha
    Sgar Saha over 3 years ago

    How to append data into existing excel, I have 3 columns.

    and is there any way to read the last cell value of a column of excel

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>