Forum Discussion

syedfasiullah's avatar
syedfasiullah
New Contributor II
10 months ago

How to download the database table contents to the Excel file .CSV format in OneStream

Hi all,

How to download the table contents from the System --> database --> Tables or Views, when I tried to download, it is allowing to download the 50 rows only - I'm not sure where is a restriction like this and how would I avoid these issues?

Thanks

 

4 Replies

  • Hector's avatar
    Hector
    New Contributor II

    Go to security, select your user. Go to preferences and change the Grid Rows Per Page.

     

    HC

    • syedfasiullah's avatar
      syedfasiullah
      New Contributor II

      Thanks Hector - what if I have more than 1000 rows, then how would I do it? I tried that option, it has maximum of only 1000 rows. 

      Thanks 

      • FredLucas's avatar
        FredLucas
        Contributor III

        Hi syedfasiullah,

        In that case you might want to export the content of the table to .csv via a business rule.

        You could do this by getting the data you want to export into a data table object like this:

        Dim dtResult As DataTable
        Using dbConnApp As DBConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si) 
          Dim strSQL As New Text.StringBuilder
          strSQL.AppendLine("Select * from TableToExport")
          dtResult = BRApi.Database.ExecuteSqlUsingReader(dbConnApp, strSQL.ToString, False)
        End Using

        And then use the DataTableToFile function that I've shared on this post:

        https://community.onestreamsoftware.com/t5/Workflow-and-Data-Integration/Export-data-using-a-Method-Query/m-p/35630