3 Replies Latest reply on Apr 7, 2016 1:57 AM by gachen

    How to display data from an Excel spreadsheet in ProcessBook?

    Gilson_Oliveira
      How can I read a cell in an Excel spreadsheet using VBA?

       

        • Re: VBA
          gachen

          Generally speaking, you can do this with Range(<cell>).Value.

           

          For example, to display a message box with the value of cell A1:

          MsgBox (Range("A1").Value)
            • Re: VBA
              Gilson_Oliveira

              Gavin,

               

               

              I need to read an Excel cell and provide the value in a PI display.

               

                • Re: VBA
                  gachen

                  Gilson,

                   

                  It probably would have been more helpful if you included this information in your original post. If you are trying to read data from an Excel sheet and save it to a PI Point, there are multiple options:

                  • Excel is compatible with ODBC drivers, so you could use ODBC to read from the sheet directly in ProcessBook via a dataset
                  • ODBC compatibility also means you could use PI RDBMS interface to read from the sheet
                  • Depending on the format of the sheet, PI UFL Interface is also another option
                  • Using VBA + PISDK, you could read the values, then write them to PI Points