Bug Report T296781
Visible to All Users

Empty rows with formatting are exported to DataTable even if the SkipEmptyRows property is true

created 9 years ago

I do not want to use worksheet.Selection to set a range that needs to be exported to a datatable.  Instead, I want to use something like:    worksheet.Range("TSS!A17:N125").
However, the export range (of populated data) might be ("TSS!A17:N30") or ("TSS!A17:N120") or something similar, but variable.
I am using exporter.Options.SkipEmptyRows = True, so any empty rows are skipped within the range which is great.
But how do I skip the empty rows between the last populated row and last range row?  For example, the Range above ends at row 125.  If the last populated row is at 120, I get “An unhandled exception of type 'System.Data.ConstraintException' occurred in System.Data.dll. Additional information: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Show previous comments (2)
DevExpress Support Team 9 years ago

    Hello,
    I have reproduced the issue when empty rows are exported to DataTable in the case when row cells contain formatting but do not contain values. I have passed this ticket to our developers for further research. Please bear with us.
    We will notify you as soon as we make any progress.

      Andrey, I cannot thank you enough for your very prompt support.
      The hotfix allows me to set the range and update.
      Thank you again.

      DevExpress Support Team 9 years ago

        You're always welcome, Larry.
        Feel free to contact us if you need further assistance.

        Answers approved by DevExpress Support

        created 9 years ago (modified 9 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.